signGenEdDSA
A function to generate a signature for a given message using the EdDSA algorithm.
Import
import { signGenEdDSA } from '@silencelaboratories/react-native-duo-sdk';
Usage
signGenEdDSA({
userToken,
partyKey,
keyshare,
hexMessageHash,
})
Parameters
params: { userToken: string, partyKey: EdDSAP1PartyKeys, keyshare: EdDSAP1Keyshare, hexMessageHash: string }
params: { userToken: string, partyKey: EdDSAP1PartyKeys, keyshare: EdDSAP1Keyshare, hexMessageHash: string }
userToken: string
The user JWT token.
partyKey: EdDSAP1PartyKeys
The party key object.
keyshare: EdDSAP1Keyshare
The keyshare object to use for signature generation.
hexMessageHash: string
Hash of a message, obtained by hashing it with a hash function and then encoding the result as a hexadecimal string.
Returns
Promise<string>
Promise<string>
Promise which resolves to the generated signature.
The signature is a base64 encoded string.
Error
DuoSDKError | undefined | unknow
DuoSDKError | undefined | unknow
If signature generation fails, the error object is thrown.