Crypto Tools

SHA-1 Hash

Hash a string with SHA-1, with optional HMAC key authentication. Computed locally, nothing is uploaded.

HMAC is a message authentication code built on a hash function and a secret key. It verifies that data is intact and really comes from who it claims to. Published as RFC 2104 in 1997, it is used widely in IPSec, TLS/SSL and similar protocols.

Output format
About SHA-1

SHA-1 (Secure Hash Algorithm 1) is a cryptographic hash function designed by the U.S. National Security Agency (NSA) and published by NIST in 1995. It turns data of any length into a 160-bit (20-byte) digest, usually written as 40 hexadecimal characters.

Like MD5, SHA-1 is a message-digest algorithm — one-way and irreversible: you can compute the digest from the input, but you cannot get the input back from the digest. Practical collision attacks are known (Google and others published the SHAttered attack in 2017), so SHA-1 is no longer recommended where security matters. Prefer SHA-256 or the SHA-3 family.

About HMAC

HMAC (Hash-based Message Authentication Code) adds a shared secret key on top of the hash function, so only parties holding the key can compute and verify the code. That is what keeps a message from being altered or forged along the way.

The SHA family compared

The SHA family covers SHA-1 (160 bit), SHA-224/256 (224/256 bit, known as SHA-2), SHA-384/512 (384/512 bit, also SHA-2) and the newer SHA-3 series. A longer output means stronger security, but also more work to compute.