Home > PHP > Function > OpenSSL > openssl_digest()

openssl_digest()

openssl_digest - Computes a digest

Syntax

string openssl_digest (string $data, string $method, bool $raw_output)

Arguments

  • data - The data.
  • method - The digest method.
  • raw_output - Setting to TRUE will return as raw output data, otherwise the return value is binhex encoded.

Description

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

Version

PHP 5.3.0

Return value

Returns the digested hash value on success or FALSE on failure.