Gen. partnerAlgotech

PHP function sha1()

Calculate the sha1 hash of a string

|
September 11, 2019

Availability in versions: PHP 4.3.0

Calculate the sha1 hash of a string

Parameters

Parameter Data type Default value Note
$str string not String being processed.
$raw_output bool null If the optional raw_output is set to true, then the sha1 digest is instead returned in raw binary format with a length of 20, otherwise the returned value is a 40-character hexadecimal number.

Return values

string

The sha1 hash as a string.

Other resources

Official sha1 documentation

Loading comments...

Stay in the loop

Subscribe to our newsletter and get the latest cybersecurity news delivered straight to your inbox.

Your data is safe. You can unsubscribe from the newsletter at any time.