Pointy Castle package
- Add
pointycastle
andhex
packages topubspec.yaml
file:
dependencies:
hex: ^0.2.0
pointycastle: ^3.0.1
- Install packages from the command line:
pub get
- Generate MD4 hash:
import 'dart:convert';
import "package:hex/hex.dart";
import 'package:pointycastle/pointycastle.dart';
void main() {
String text = 'Hello';
var digestObject = Digest('MD4');
var bytes = digestObject.process(utf8.encode(text));
String digest = HEX.encode(bytes);
print(digest);
}
Leave a Comment
Cancel reply