Flutter 3des encryption

448 Views Asked by At

I need some help with successfully implementing 3des encryption on my flutter project, heres what i have and i dont know where i could be going wrong. Following the documentation on https://pub.flutter-io.cn/packages/flutter_3des I get

java.security.InvalidException: Wrong Key Size.
void doEncryption() async {
String key = "Seaxveqnxpqt0q2w";
String string = "3056775474;011";
var _encrypt = await Flutter3des.encrypt(string, key, iv: iv)
}

Here's a screenshot of my implementation. Console Message

1

There are 1 best solutions below

0
Muzammil Zafar On

My friend your key is 16 byte this algorithm required 24 byte key for encryption use this as a sample static const _key = "702040801020305070B0D1101020305070B0D1112110D0B0";