diffie_hellman 0.0.4 copy "diffie_hellman: ^0.0.4" to clipboard
diffie_hellman: ^0.0.4 copied to clipboard

outdated

Pure Dart implementation of modular DH groups. Based on PKCS#3.

example/example.dart

import 'package:diffie_hellman/src/engines/dh_pkcs3_engine.dart';
import 'package:diffie_hellman/src/models/dh_key_pair.dart';

void main() {
  DhPkcs3Engine dhEngine = DhPkcs3Engine.fromGroup(18);
  DhPkcs3Engine otherDhEngine = DhPkcs3Engine.fromGroup(18);

  DhKeyPair keyPair = dhEngine.generateKeyPair();
  DhKeyPair otherKeyPair = otherDhEngine.generateKeyPair();

  print('Public Key: ${keyPair.publicKey}');
  print('Private Key: ${keyPair.privateKey}');
  print('Other public Key: ${otherKeyPair.publicKey}');
  print('Other private Key: ${otherKeyPair.privateKey}');
}
15
likes
0
points
523
downloads

Publisher

verified publisherxeertz.com

Weekly Downloads

Pure Dart implementation of modular DH groups. Based on PKCS#3.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, pointycastle

More

Packages that depend on diffie_hellman