sha1
Declaration: string sha1 (string $str, bool $raw_output )
Description: Calculate the sha1 hash of a string
Returns: the sha1 hash as a string.
Parameters:
-
string $str:
The input string.
-
bool $raw_output:
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.
Documentation: http://www.php.net/manual/en/function.sha1.php
Try sha1 Online Show me an example of sha1
SHA1 Hash Algorithm
This function uses the PHP sha1 function:
From php.net:
Calculates the sha1 hash of str using the US Secure Hash Algorithm 1, and returns that hash. The hash is a 40-character hexadecimal number.
Information from Wikkipedia the the free encyclopedia.:
The SHA (Secure Hash Algorithm) family is a set of related cryptographic hash functions. The most commonly used function in the family, SHA-1, is employed in a large variety of popular security applications and protocols, including TLS, SSL, PGP, SSH, S/MIME, and IPSec. SHA-1 is considered to be the successor to MD5, an earlier, widely-used hash function. The SHA algorithms were designed by the National Security Agency (NSA) and published as a US government standard.
The first member of the family, published in 1993, is officially called SHA; however, it is often called SHA-0 to avoid confusion with its successors. Two years later, SHA-1, the first successor to SHA, was published. Four more variants have since been issued with increased output ranges and a slightly different design: SHA-224, SHA-256, SHA-384, and SHA-512 � sometimes collectively referred to as SHA-2.
Attacks have been found for both SHA-0 and SHA-1, while no attacks have been reported on the SHA-2 variants.
From php.net:
Calculates the sha1 hash of str using the US Secure Hash Algorithm 1, and returns that hash. The hash is a 40-character hexadecimal number.
Information from Wikkipedia the the free encyclopedia.:
The SHA (Secure Hash Algorithm) family is a set of related cryptographic hash functions. The most commonly used function in the family, SHA-1, is employed in a large variety of popular security applications and protocols, including TLS, SSL, PGP, SSH, S/MIME, and IPSec. SHA-1 is considered to be the successor to MD5, an earlier, widely-used hash function. The SHA algorithms were designed by the National Security Agency (NSA) and published as a US government standard.
The first member of the family, published in 1993, is officially called SHA; however, it is often called SHA-0 to avoid confusion with its successors. Two years later, SHA-1, the first successor to SHA, was published. Four more variants have since been issued with increased output ranges and a slightly different design: SHA-224, SHA-256, SHA-384, and SHA-512 � sometimes collectively referred to as SHA-2.
Attacks have been found for both SHA-0 and SHA-1, while no attacks have been reported on the SHA-2 variants.
There are no Comments.








