Skip to content

Instantly share code, notes, and snippets.

@pinkeshdarji
Created June 25, 2021 06:56
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 pinkeshdarji/f9646c81f3f8e3f10745780d635ab917 to your computer and use it in GitHub Desktop.
Save pinkeshdarji/f9646c81f3f8e3f10745780d635ab917 to your computer and use it in GitHub Desktop.
Future<void> _generateKeys() async {
//1. Generate keys
KeyPair<EcdhPrivateKey, EcdhPublicKey> keyPair =
await EcdhPrivateKey.
(EllipticCurve.p256);
Map<String, dynamic> publicKeyJwk =
await keyPair.publicKey.exportJsonWebKey();
Map<String, dynamic> privateKeyJwk =
await keyPair.privateKey.exportJsonWebKey();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment