Hello,
the fourth parameter 'signature_alg' to choose the signature algorithm can be one of:
OPENSSL_ALGO_SHA1
OPENSSL_ALGO_MD5
OPENSSL_ALGO_MD4
OPENSSL_ALGO_MD2
Just for the case that somebody needs this.
Regards
![]() | openssl_signDescriptionbool openssl_sign ( string data, string &signature, mixed priv_key_id [, int signature_alg] )如果成功则返回 TRUE,失败则返回 FALSE。 If successful the signature is returned in signature. 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.
See also openssl_verify(). ![]()
adam dot mansfeld at gmail dot com
19-Oct-2005 03:50
Hello, | ![]() |