encryption library

Functions

decryptAsymmetricBytes(String encryptedBase64, String hexPrivateKey) Uint8List
decryptAsymmetricRaw(Uint8List encryptedBytes, String hexPrivateKey) Uint8List
decryptAsymmetricString(String encryptedBase64, String hexPrivateKey) String
decryptSymmetricBytes(String encryptedBase64, String passphrase) Uint8List
decryptSymmetricRaw(Uint8List encryptedBuffer, String passphrase) Uint8List
decryptSymmetricString(String b64CipherBytes, String passphrase) String
Decrypts the given base64 encoded buffer, containing nonce[24] + cipherText[] with the given passphrase using SecretBox
encryptAsymmetricBytes(Uint8List bytesPayload, String hexPublicKey) String
encryptAsymmetricRaw(Uint8List bytesPayload, String hexPublicKey) Uint8List
encryptAsymmetricString(String strPayload, String hexPublicKey) String
encryptSymmetricBytes(Uint8List buffer, String passphrase) String
encryptSymmetricRaw(Uint8List buffer, String passphrase) Uint8List
encryptSymmetricString(String message, String passphrase) String
Encrypts the given message with the given passphrase using SecretBox and returns a base64 encoded buffer containing nonce[24] + cipherText[]. The 24 first bytes represent the nonce, and the rest of the buffer contains the cipher text. The 16 first bytes of the cipher text (containing zeroes) are trimmed out