Miklix

HAVAL-192/5 Hash Code Calculator

Published: February 10, 2025 at 4:44:13 PM UTC

Hash code calculator that uses the Hash of Variable Length 192 bits, 5 rounds (HAVAL-192/5) hash function to calculate a hash code based on text input or file upload.

HAVAL (Hash of Variable Length) is a cryptographic hash function designed by Yuliang Zheng, Josef Pieprzyk, and Jennifer Seberry in 1992. It is an extension of the MD (Message Digest) family, specifically inspired by MD5, but with significant improvements in flexibility and security. It can produce hash codes of variable lengths from 128 to 256 bits, processing the data in 3, 4 or 5 rounds.

The variant presented on this page outputs a 192 bit (24 byte) hash code calculated in 5 rounds. The result is output as a 48 digit hexadecimal number.

Full disclosure: I did not write the specific implementation of the hash function used on this page. It is a standard function included with the PHP programming language. I only made the web interface to make it publicly available here for convenience.


Calculate New Hash Code

Data submitted or files uploaded through this form will only be kept on the server for as long as it takes to generate the requested hash code. It will be deleted immediately before the result is returned to your browser.

Input data:



Submitted text is UTF-8 encoded. Since hash functions operate on binary data, the result will be different than if the text was in another encoding. If you need to calculate a hash of a text in a specific encoding, you should upload a file instead.



About the HAVAL Hash Algorithm

Imagine HAVAL as a super-powerful blender designed to mix up ingredients (your data) so thoroughly that no one can figure out the original recipe just by looking at the final smoothie (the hash).

Step 1: Preparing the Ingredients (Your Data)

When you give HAVAL some data - like a message, password, or file - it doesn't just toss it into the blender as-is. First, it:

  • Cleans and chops the data into neat pieces (this is called padding).
  • Makes sure the total size fits the blender perfectly (like making sure smoothie ingredients fill the jar evenly).

Step 2: Blending in Rounds (Mixing Passes)

HAVAL doesn’t just press "blend" once. It mixes your data through 3, 4, or 5 rounds - like blending your smoothie multiple times to make sure every chunk is pulverized.

  • 3 passes: A quick blend (fast but not very secure).
  • 5 passes: A super-thorough blend (slower but much more secure).

Each round mixes the data differently, using special "blades" (math operations) that chop, flip, stir, and mash the data in crazy, unpredictable ways.

Step 3: Secret Sauce (Compression Function)

Between blending rounds, HAVAL adds its secret sauce - special recipes that stir things up even more. This step ensures that even a tiny change in your data (like changing one letter in a password) makes the final smoothie completely different.

Step 4: The Final Smoothie (The Hash)

After all the blending, HAVAL pours out your final "smoothie".

  • This is the hash - a unique fingerprint of your data.
  • No matter how big or small your original data was, the hash is always the same size. It's like putting any size fruit into a blender but always getting the same cup of smoothie.

As of 2025, only HAVAL-256/5 is still considered reasonable secure for cryptographic purposes, although you shouldn't use it when designing new systems. If you're still using it in a legacy system you're not in any immediate risk, but consider migrating to for example SHA3-256 in the longer term.

Share on BlueskyShare on FacebookShare on LinkedInShare on TumblrShare on XShare on LinkedInPin on Pinterest

Mikkel Bang Christensen

About the Author

Mikkel Bang Christensen
Mikkel is the creator and owner of miklix.com. He has over 20 years experience as a professional computer programmer/software developer and is currently employed full-time for a large European IT corporation. When not blogging, he spends his spare time on a vast array of interests, hobbies, and activities, which may to some extent be reflected in the variety of topics covered on this website.