PHP.nl

openssl_digest

openssl_digest

Computes a digest

 **openssl_digest** string $data string $digest_algo bool $binary

Computes a digest hash value for the given data using a given method, and returns a raw or binhex encoded string.

dataThe data.

digest_algo The digest method to use, e.g. "sha256", see for a list of available digest methods. openssl_get_md_methods

binarySetting to true will return as raw output data, otherwise the return value is binhex encoded.

Returns the digested hash value on successreturn.falseforfailure.

Emits an level error if an unknown signature algorithm is passed via the parameter. E_WARNING``digest_algo

openssl_get_md_methods