decode static method

String decode(
  1. String content,
  2. String secret
)

decode a message

AESEncryptor.decode('encoded_message');

Implementation

static String decode(String content, String secret) {
  try {
    Uint8List decrypted = _cipher(
      false,
      secret,
    ).process(base64.decode(content));
    return utf8.decode(base64.decode(utf8.decode(decrypted)));
  } catch (error) {
    print('AESEncryption Error: ${error.toString()}');
    return '';
  }
}