crypto_sign_open

The crypto_sign_open() function verifies the signature in 'sm' using the receiver's public key 'pk'. The crypto_sign_open() function returns the message.

WARNING! This function allocates!

  1. bool crypto_sign_open(ubyte[] msg, const(ubyte)[] sm, const(ubyte)[] pk)
  2. ubyte[] crypto_sign_open(const(ubyte)[] sm, const(ubyte)[] pk)
    ubyte[]
    crypto_sign_open
    ()
    (
    const(ubyte)[] sm
    ,
    const(ubyte)[] pk
    )

Parameters

sm const(ubyte)[]

= signed message

pk const(ubyte)[]

= public key, slice size must be at least crypto_sign_PUBLICKEYBYTES, extra ignored

Return Value

Type: ubyte[]

decrypted message or null on error

Meta