(Since version ) Use the Crypto object factory methods instead of directly calling this constructor. e.g. Crypto.defaultCipherForRawKey or Crypto.defaultCipherForBase64Key
(Since version ) Use the Crypto object factory methods instead of directly calling this constructor. e.g. Crypto.defaultCipherForRawKey or Crypto.defaultCipherForBase64Key
Decrypt given the IV and Ciphertext
Decrypt given the combined IV and Ciphertext
Decrypt a string encrypted using encryptBase64String()
Encrypt bytes returning the iv and ciphertext combined into a single byte array (iv followed by the cipher text)
Encrypt Bytes returning the tuple: (iv, ciphertext)
Encrypt a string returning the tuple: (iv, ciphertext)
Calculate the MAC for an array of bytes
The Base64 Encoded MAC for an array of bytes
The Hex Encoded MAC for an array of bytes
The Hex Encoded MAC for a String
Attempt to decrypt a string encrypted using encryptBase64String()
Attempt to decrypt a string encrypted using encryptBase64String()
If successful then Some(plaintext) will be returned. Otherwise None will be returned.
A Simple Crypto Class
NOTE: Use at your own risk. We make no claim that any of this Crypto code is correct.