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
Decrypts a byte array containing nonce[24] + cipherText[] using NaCl SecretBox: https://github.com/ilap/pinenacl-dart#a-secret-key-encryption-example
decryptSymmetricRaw(Uint8List encryptedBuffer, String passphrase) Uint8List
Decrypts a byte array containing nonce[24] + cipherText[] using NaCl SecretBox: https://github.com/ilap/pinenacl-dart#a-secret-key-encryption-example
decryptSymmetricString(String encryptedBase64, String passphrase) String
Decrypts a byte array containing nonce[24] + cipherText[] into a String using NaCl SecretBox: https://github.com/ilap/pinenacl-dart#a-secret-key-encryption-example
encryptAsymmetricBytes(Uint8List bytesPayload, String hexPublicKey) String
encryptAsymmetricRaw(Uint8List bytesPayload, String hexPublicKey) Uint8List
encryptAsymmetricString(String strPayload, String hexPublicKey) String
encryptSymmetricBytes(Uint8List buffer, String passphrase) String
Encrypts the given data using NaCl SecretBox and returns a Base64 string containing nonce[24] + cipherText[]. The 24 first bytes represent the nonce, and the rest of the buffer contains the cipher text.
encryptSymmetricRaw(Uint8List buffer, String passphrase) Uint8List
Encrypts the given data using NaCl SecretBox and returns a Uint8List containing nonce[24] + cipherText[]. The 24 first bytes represent the nonce, and the rest of the buffer contains the cipher text.
encryptSymmetricString(String message, String passphrase) String
Encrypts the given string using NaCl SecretBox and returns a Base64 string containing nonce[24] + cipherText[]. The 24 first bytes must contain the nonce, and the rest of the buffer needs to contain the cipher text.