Crypto for Android

Delphi and C++Builder cryptography library for Android.
  • uses Android Cryptography APIs
  • available for Delphi/C++Builder 10.4 - 12
  • source code included in registered version
  • royalty free distribution in applications

Crypto library code doesn't contain implementation of any crypto algorithm.

FAQ

How can I use AES encryption and decryption?
const SecretKey = CreateSecretKey('AES', TBytes.Create($0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $A, $B, $C, $D, $E, $F));
const InitializationVector = CreateIvParameterSpec(TBytes.Create($F, $E, $D, $C, $B, $A, $9, $8, $7, $6, $5, $4, $3, $2, $1, $0));

var CipherText: TBytes;

// AES encryption
with CreateCipher('AES/CBC/PKCS5PADDING') do
begin
  Initialize(TCipherMode.Encrypt, SecretKey, InitializationVector);
  CipherText := Final('Hello, world!');
end;

// AES decryption
with CreateCipher('AES/CBC/PKCS5PADDING') do
begin
  Initialize(TCipherMode.Decrypt, SecretKey, InitializationVector);
  const PlainBytes = Final(CipherText);
  const PlainText = TEncoding.UTF8.GetString(PlainBytes);
  ShowMessage(PlainText);
end;