Created
September 10, 2022 15:31
-
-
Save vikramacharya/d741a0883ae44255fbef4b2b5276964b 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 signMessage = async (signing_string: string, privateKey: string) => { | |
await _sodium.ready; | |
const sodium = _sodium; | |
const signedMessage = sodium.crypto_sign_detached(signing_string, sodium.from_base64(privateKey, base64_variants.ORIGINAL)); | |
return sodium.to_base64(signedMessage, base64_variants.ORIGINAL); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment