sodium_crypto_sign

sodium_crypto_signSign a message

Description

sodium_crypto_sign(string $message, string $secret_key): string

Sign a message with a secret key, that can be verified by the corresponding public key. This function attaches the signature to the message. See sodium_crypto_sign_detached() for detached signatures.

Parameters

message

Message to sign.

secret_key

Secret key. See sodium_crypto_sign_secretkey()

Return Values

Signed message (not encrypted).