javahashmd5md5summd5-file

How to manually write MD5 (to get the hash of a file) algorithm in Java?


Well, I kinda have a task where I have to take a file and generate MD5 hash of that file. Problem is that I can't really use any classes that would automate this processes so everything has to be programmed manually. And that prob would mean that I can't use java.security.MessageDigest >> getInstance("MD5") to get an MD5 message. So yeah I am not really sure how to write needed algorithm because it seems that everyone uses MessageDiggest Class. Any ideas?


Solution

  • I found this implementation of MD5: https://rosettacode.org/wiki/MD5/Implementation#Java

    I haven't tested if this is 100% correct though