Skip to content

Instantly share code, notes, and snippets.

@ketola
Last active November 30, 2019 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ketola/12778e3e6b1d3c72c608ecff878abd2b to your computer and use it in GitHub Desktop.
Save ketola/12778e3e6b1d3c72c608ecff878abd2b to your computer and use it in GitHub Desktop.
Libra key-pair
Security.addProvider(new BouncyCastleProvider());
KeyPairGenerator kpGen = KeyPairGenerator.getInstance("Ed25519", "BC");
KeyPair keyPair = kpGen.generateKeyPair();
PrivateKey privateKey = keyPair.getPrivate();
PublicKey publicKey = keyPair.getPublic();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment