flutter_3des

A flutter implementation of Triple DES (3DES) algorithm. This plugin is an improvement of flutter_des

A comparison of Android/iOS result and that of CryptoJS

AndroidiOS
AndroidiOS
CryptoJS ImplementationCryptoJS Output
CryptoJS ImplementationCryptoJS Output

Getting Started

Add Dependency

dependencies:
  flutter_3des: #latest version

Implementation


void example() async {
  const string = "my name is flutter";
  const key = "702040801020305070B0D1101020305070B0D1112110D0B0";
  const iv = "070B0D1101020305";

  var encrypt = await Flutter3des.encrypt(string, key, iv: iv);
  var decrypt = await Flutter3des.decrypt(encrypt, key, iv: iv);
  var encryptHex = await Flutter3des.encryptToHex(string, key, iv: iv);
  var decryptHex = await Flutter3des.decryptFromHex(encryptHex, key, iv: iv);
  var encryptBase64 = await Flutter3des.encryptToBase64(string, key, iv: iv);
  var decryptBase64 = await Flutter3des.decryptFromBase64(encryptBase64, key, iv: iv);
}```

Libraries

flutter_3des