openssl_sign()
openssl_sign - Generate signature
Syntax
bool openssl_sign (
string $data,
string &$signature,
mixed $priv_key_id,
int $signature_alg)
Arguments
- data
- signature - If the call was successful the signature is returned in signature.
- priv_key_id
- signature_alg - For more information see the list of Signature Algorithms.
Description
openssl_sign() computes a signature for the specified data by using SHA1 for hashing followed by encryption using the private key associated with priv_key_id. Note that the data itself is not encrypted.
Version
PHP 4.0.4, 5
Return value
Returns TRUE on success or FALSE on failure.