wcDecrypt function
Decrypt a base64 WC envelope, returning the plaintext message.
Implementation
String wcDecrypt({required String symKeyHex, required String encoded}) {
final env = wcDeserialize(encoded);
final pt = chacha20Poly1305Decrypt(
key32: hexDecode(symKeyHex),
nonce12: env.iv,
ciphertextWithTag: env.sealed,
);
return utf8.decode(pt);
}