Created
September 10, 2022 16:37
-
-
Save vikramacharya/eef1dc2a935e7c9e1f7f9f212c6834be to your computer and use it in GitHub Desktop.
This file contains hidden or 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
export const createKeyPair = async () => { | |
let {publicKey , privateKey} = sodium.crypto_sign_keypair(); | |
const publicKey_base64 = sodium.to_base64(publicKey, base64_variants.ORIGINAL); | |
const privateKey_base64 = sodium.to_base64(privateKey, base64_variants.ORIGINAL); | |
return { publicKey : publicKey_base64, privateKey : privateKey_base64 }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment