haval128,4 hash generator online

Create the haval128,4 hash of any text: 32 hex characters, the same result as PHP's hash(). Check a hash or a file below. Nothing leaves your browser.

Runs in your browser
A hash is one-way. It can't be turned back into the text.
Check & convert

Compare, hash a file, copy any format

Type text in the tool above or choose a file. Case, spaces and prefixes like haval128,4: don't matter.

Formats for hello world
Hex
c97d46956b8e3e60acd2bb090c482c5e
HEX (upper case)
C97D46956B8E3E60ACD2BB090C482C5E
Base64
yX1GlWuOPmCs0rsJDEgsXg==

Files are read in your browser and never uploaded.

In short

What is HAVAL-128, 4 passes?

HAVAL is a hash by Zheng, Pieprzyk and Seberry (1992) with a choice of 3, 4 or 5 passes and five output lengths. haval128,4 uses 4 passes and gives 128 bits (32 hex characters). Shorter outputs are folded from the 256-bit state, not simply cut, so they don't match the start of haval256. Attacks on reduced versions are known; it is only used to match old data.

LegacyNo practical break of the full algorithm is public, but it is rarely used and not recommended for new designs.
Try it

Change one letter, see what happens

A cryptographic hash changes about half of all bits when one input character changes. Nothing about the old hash tells you what the new one will be.

Hash A…
Hash B…

Calculating…

Use it in code

The same result in your code

Every snippet prints c97d46956b8e3e60acd2bb090c482c5e for hello world, the same as the tool. They are run against PHP's hash() before each release.

PHP
echo hash('haval128,4', 'hello world');

Python, JavaScript, Java and Go have no built-in function for it. If you use a library, compare its output with the test values above.

Test values

HAVAL-128, 4 passes test values

Hashes of common test strings (UTF-8, no line break). Use them to check your own implementation.

Inputhaval128,4
empty stringee6bbf4d6a46a679b3a856c88538bb98
abc6f2132867c9648419adcd5013e532fa2
hello worldc97d46956b8e3e60acd2bb090c482c5e
The quick brown fox jumps over the lazy dog6eece560a2e8d6b919e81fe91b0e7156
Common mistakes

Why your HAVAL-128, 4 passes doesn't match

Shorter HAVAL ≠ cut HAVAL

HAVAL folds its 256-bit state down to 128–224 bits, so haval128,3 is not the start of haval256,3.

Passes change everything

haval256,3, haval256,4 and haval256,5 give three unrelated results. Both numbers have to match.

A line break sneaks in

echo "hello world" | sha256sum hashes 12 bytes: the text plus a line break. Use printf '%s' 'hello world' or echo -n to hash exactly 11 bytes.

Same text, different bytes

The tool hashes UTF-8 bytes, like most languages. Windows APIs and .NET's Encoding.Unicode use UTF-16, older systems Latin-1. "ü" is 2 bytes in UTF-8, 1 in Latin-1, 2 in UTF-16, and each gives a different hash.

Upper or lower case

Hex is not case-sensitive: 5EB63BBB… and 5eb63bbb… are the same hash. Compare in one case, and watch for spaces or a prefix like "sha256:".

This tool trims and uses CRLF

Like the form on the original site, the tool removes spaces and line breaks at the start and end and sends line breaks as CRLF (\r\n). For exact bytes use "Hash a file" or "Exactly as typed" in the check panel.

Compare

The HAVAL family side by side

The same text, every HAVAL algorithm. Shown for hello world; type in the tool above to use your text.

AlgorithmHashBits
haval128,3906c1df7cbe6d318f36ab172f95e89c0128
haval160,36e733b21876e47c2168a122e23d86bdd69e50f95160
haval192,3ec67a6a417953fdbf3496502004b6c21b270d5890dedd931192
haval224,3766879d9ba1dc9e24a6040908a7ae813a47b08af5c5f3beebcacda48224
haval256,345492c6c8adab277759f4381420799431a037daf6d829b8b5c21104c10f61a92256
haval128,4c97d46956b8e3e60acd2bb090c482c5e128
haval160,42cb8b12eb5a2561022010c2a2af8795e602fdef2160
haval192,439a281e4e492533b6dfea0af294149ccac771ab87204c9ec192
haval224,43d64d34aea48f5e649ed6147da5d29d31c762a937e9e21f4da1f3106224
haval256,40359a526d77e271707c44d9b270e68a394f8486a459f0137ad5e1d02e44c5889256
haval128,58332ad9f32e385d9acd421b63ee04cfc128
haval160,5d33cf9052d55da9b0f506cb8849097939363e361160
haval192,567c3492878c8fc4819c8589231fcfe69b15b015c1ca48ac5192
haval224,56bedeb6a8676e46413c020c8813c022486ca93353b8a0673fb577ba1224
haval256,5f5f6ffcfe39a65ac2c3989430340420341762a6624ebd69b9d08ec1dc4b9f167256
Measured on your device

How fast is HAVAL-128, 4 passes?

Hashes up to 4 MB of random data in your browser and compares with sha256, xxh3. Browser numbers are lower than native code, but the ranking holds.

FAQ

Questions about HAVAL-128, 4 passes

Can HAVAL-128, 4 passes be decrypted?

No. HAVAL-128, 4 passes is a one-way function: there is no key and no way to compute the input from the hash. Sites that "decrypt" HAVAL-128, 4 passes look the hash up in large tables of known inputs, which only works for short or common strings.

How long is a HAVAL-128, 4 passes hash?

A HAVAL-128, 4 passes hash is always 128 bits, written as 32 hexadecimal characters (16 bytes), no matter how long the input is.

Is HAVAL-128, 4 passes secure?

It is not known to be broken in practice, but HAVAL-128, 4 passes is rarely used, little studied today and not recommended for new designs. Use SHA-256 or SHA3-256 instead.

Should I hash passwords with HAVAL-128, 4 passes?

No. HAVAL-128, 4 passes is fast, so attackers can test huge numbers of guesses. Use Argon2id, bcrypt or scrypt with a unique salt per password.

What do the numbers in haval128,4 mean?

128 is the output length in bits, 4 the number of passes over each block. Change either and you get a different hash.

Good to know

Before you rely on it

Searches the list of pages on this site. What you type stays in your browser.