getDecodedPayload static method
decrypt and decompress target input.
Implementation
static Map<String, dynamic> getDecodedPayload(
String input, Nonce nonce, ChaCha20? chaCha20,
{bool compressed = true}) {
if (chaCha20 == null) compressed = false;
if (chaCha20 != null) {
input = chaCha20.decrypt(input, nonce);
}
if (compressed) {
ZLibDecoder zlibE = ZLibDecoder();
input = utf8.decode(zlibE.convert(base64Decode(input)));
}
return jsonDecode(input);
}