decrypt method

String decrypt(
  1. String cipherText,
  2. Nonce nonce
)

Implementation

String decrypt(String cipherText, Nonce nonce) {
  ChaCha20Algorithm chaCha20Algorithm =
      ChaCha20Algorithm(_password, 0, nonce.intList);
  Uint8List inputBytes = base64Decode(cipherText);
  return String.fromCharCodes(chaCha20Algorithm.processBytes(inputBytes));
}