hmac_drgb 1.0.1 hmac_drgb: ^1.0.1 copied to clipboard
dart implementation of [HMAC DRBG]. dart implementation of [HMAC DRBG].
example/hmac_drgb_example.dart
import 'dart:typed_data';
import 'package:hash/hash.dart';
import 'package:hmac_drgb/hmac_drgb.dart';
void main() {
var drbg = HmacDRBG(
hash: SHA256(),
outLen: 256,
entropy: Uint8List.fromList('entropy'.codeUnits),
nonce: Uint8List.fromList('nonce'.codeUnits),
pers: Uint8List.fromList('pers'.codeUnits),
);
print(drbg.generate(32));
/// => [223, 110, 210, 86, 254, 183, 196, 138, 190, 248, 92, 76, 228, 11, 114, 177, 107, 85, 190, 86, 194, 225, 228, 39, 255, 18, 133, 161, 7, 16, 254, 192]
}