Skip to content

Token.Crypto.verify returns undefined when result is true. #312

@aaqib90

Description

@aaqib90

static verify(message, signature, publicKey) { const msg = Util.wrapBuffer(message); const sig = Util.bufferKey(signature); const result = nacl.sign.detached.verify(msg, sig, publicKey); if (!result) { throw new Error( Invalid signature ${signature} on message ${message} with pk ${publicKey}); } }

The above function from the Crypto class does not return anything when the result is true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions