crypto_sign

The crypto_sign() function signs a message 'msg' using the sender's secret key 'sk'. The crypto_sign() function returns the resulting signed message.

WARNING! This function allocates!

  1. void crypto_sign(ubyte[] sm, const(ubyte)[] msg, const(ubyte)[] sk)
  2. ubyte[] crypto_sign(const(ubyte)[] msg, const(ubyte)[] sk)
    ubyte[]
    crypto_sign
    ()
    (
    const(ubyte)[] msg
    ,
    const(ubyte)[] sk
    )

Parameters

msg const(ubyte)[]

= message

sk const(ubyte)[]

= secret key, slice size must be at least crypto_sign_SECRETKEYBYTES, extra ignored

Return Value

Type: ubyte[]

signed message

Meta