Created
June 25, 2021 06:56
-
-
Save pinkeshdarji/f9646c81f3f8e3f10745780d635ab917 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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