Encoder Decoder

SHA-1 Hash URL Encode Decode Base64 Encode Base64 Decode MD5 Hash SHA-256 SHA-512 Home

SHA-1 Hash Generator

What is a SHA-1 Hash?

SHA-1 (Secure Hash Algorithm) is a 160 bit cryptographic hash function created by the NSA in 1995. It creates a 40 byte hash value for the input of the algorithm. SHA-1 is one-way, meaning that the original input cannot be be determined simply by knowing the hash value. SHA-1 was designed to be collision resistant, meaning that two inputs could not have the same hash value.

When and why would you use SHA-1 Hash?

SHA-1 is often used as a checksum algorithm. Text or files are fed into the MD5 algorithm and the resulting hash would change if the file had been changed. This is done to detect malicious tampering, or file corruption.

SHA-1 has also historically been used as a password hashing algorithm. Password hashing algorithms allow a password to be stored, in a website's database for instance, without having to store the actual password. This makes it more difficult to steal passwords, and if the hash is taken, the user's password is not necessarily compromised. When using a hashing algorithm for passwords it is wise to use "salt". With SHA-1, salt is added by concatinating a string unrelated to the password to the user supplied password string.