jQuery jQuery SHA1 hash algorithm function
Back to main plugin's page.
Download Version

jQuery SHA1 hash algorithm function


Calculate the sha1 hash of a String
String $.sha1 ( String str )


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).

This function orginally get from the WebToolkit and rewrite for using as the jQuery plugin.


Example

Code
$.sha1("I'm Persian.");
Result
"1d302f9dc925d62fc859055999d2052e274513ed"
Back to main plugin's page.
Semnan Web