Functions
| Function | Output Format | Description |
|---|---|---|
hash.md5(data) | 32-char hex | MD5 hash |
hash.sha1(data) | 40-char hex | SHA-1 hash |
hash.sha256(data) | 64-char hex | SHA-256 hash |
hash.sha512(data) | 128-char hex | SHA-512 hash |
hash.blake3(data) | 64-char hex | BLAKE3 hash (very fast) |
hash.xxhash(data) | 16-char hex | XXH3 64-bit hash (extremely fast, non-crypto) |
hash.xxhash128(data) | 32-char hex | XXH3 128-bit hash |
Examples
Performance
- xxHash is the fastest, suitable for hash tables or checksums.
- BLAKE3 is the fastest cryptographic hash.
- SHA-256 is standard for security.