cryptoSecretBoxOpenEasy method

  1. @override
Future<String> cryptoSecretBoxOpenEasy(
  1. String ciphertext,
  2. String nonce,
  3. String key
)
override

Implementation

@override
Future<String> cryptoSecretBoxOpenEasy(
  String ciphertext,
  String nonce,
  String key,
) async {
  final c = HexConverter.hexToBytes(ciphertext);
  final n = HexConverter.hexToBytes(nonce);
  final k = HexConverter.hexToBytes(key);
  final result = interop.crypto_secretbox_open_easy(c, n, k);
  return String.fromCharCodes(result);
}