About SHA-1
The Secure Hash Algorithm 1 produces a 160-bit (40 hex character) digest. Published by NIST in 1995, SHA-1 was used widely in TLS, SSH, Git, and password storage. It has been deprecated for security-sensitive use since the late 2000s and effectively broken since Google and CWI Amsterdam demonstrated a practical SHAttered collision in 2017.
Generating SHA-1 hashes
echo -n password | sha1sum -
5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 -
>>> import hashlib
>>> hashlib.sha1(b'password').hexdigest()
'5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8'
Where SHA-1 still appears
SHA-1 persists in legacy password databases, Git object IDs (moving to SHA-256), and some older PKI chains. Never use it for new password storage — prefer SHA-256, SHA-3, or a password-specific KDF like bcrypt or Argon2.