decryptWithBytes function
解密 将list进行解密,keylist是解密用的key
Implementation
List<int> decryptWithBytes(List<int> list, List<int> keyList) {
final Key key = Key(Uint8List.fromList(keyList));
final encrypter = Encrypter(AES(key, mode: AESMode.ecb, padding: null));
final encrypted = Encrypted(Uint8List.fromList(list));
List<int> decrypted = encrypter.decryptBytes(encrypted);
// print('decrypted');
//
// print(decrypted);
print('解密结果:' + int2basse16(decrypted));
return decrypted;
}