dart_3des
Triple DES and DES block cipher implementation ported from CryptoJS
This is ported from CryptoJS. The latest version can be found bryx/cryptojs or sytelus/CryptoJS
Installing
Add the dependency
In your pubspec.yaml
file add:
dart_3des: 1.0.0
- If in flutter
- run
flutter pub get
- If in dart
- run
dart pub get
Example
import 'package:dart_3des/dart_3des.dart';
main() {
var key = "cipher";
var blockCipher = new BlockCipher(new DESEngine(), key);
var message = "Uganda is a really difficult country";
var ciphertext = blockCipher.encodeB64(message);
var decoded = blockCipher.decodeB64(ciphertext);
print("key: $key");
print("message: $message");
print("ciphertext (base64): $ciphertext");
print("decoded ciphertext: $decoded");
}