Computes the 160-bit SHA-1 hash of a string. Returns a 40-character hexadecimal string.
VARCHAR(40)Diperbarui: 13 Jun 2026SHA1(str)The string to hash
1 SELECT SHA1('hello') AS hash;
SHA1 hash of 'hello'.
1 SELECT SHA1(CONCAT(user_id, NOW(), RAND())) AS token 2 FROM users;
Generate a unique token per user.
1 SELECT SHA1(CONCAT_WS('|', title, content, modified_at)) AS version_hash 2 FROM documents;
Hash for version tracking.
Sudah paham SHA1? Latih langsung di browser
Latihan interaktif, langsung di browser.