SHA1 hash algorithm function

SHA1 hash algorithm function

Calculates the sha1 hash of str using the US Secure Hash Algorithm 1.

SHA-1 the Secure Hash Algorithm (SHA) was developed by NIST and is specified in the Secure Hash Standard (SHS, FIPS 180).

This script is used to process variable length message into a fixed-length output using the SHA-1 algorithm. It is fully compatible with UTF-8 encoding.

If you plan using UTF-8 encoding in your project don't forget to set the page encoding to UTF-8 (Content-Type meta tag).

  1. $.sha1("I'm Persian."); // return "1d302f9dc925d62fc859055999d2052e274513ed" 



转载请注明:代码家园 » SHA1 hash algorithm function