openssl_sign

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.

// At least with PHP 5.2.2 / OpenSSL 0.9.8b (Fedora 7)// there seems to be no need to call openssl_get_privatekey or similar.// Just pass the key as defined aboveopenssl_sign($data, $binary_signature, $private_key, OPENSSL_ALGO_SHA1);