decryptSymmetricBytes function

Uint8List decryptSymmetricBytes(
  1. String encryptedBase64,
  2. String passphrase
)

Decrypts a byte array containing nonce[24] + cipherText[] using NaCl SecretBox: https://github.com/ilap/pinenacl-dart#a-secret-key-encryption-example

Implementation

Uint8List decryptSymmetricBytes(String encryptedBase64, String passphrase) {
  final encryptedBuffer = base64.decode(encryptedBase64);
  return decryptSymmetricRaw(encryptedBuffer, passphrase);
}