Tired of always coding a quick MD5 or SHA256 hash digest code to run checksums, I finally coded this really simple script in Ruby. Then, to make it easier to run, I generated a windows batch file that takes an input file and returns the MD5 and SHA256 checksums.
To run the batch file, just run:
D:\> md5_sha256 .\ruby_code\security_hash\test.txt
SHA256 Digest: b31be10c867258146b4b10409fa6ffd46e5e196b7a4f9d11c0c354903cafdaa1
MD5 Digest: 3e09efe7694c40db6ad990f9d7d8e786
I've zipped up the project files (includes the Ruby script, the windows batch file, the test text file used above, and my unit testing code (in the directory called test)). And the MD5 and SHA256 checksums are:
MD5 Digest: 0f31140686af1e03e1c1a5a87e7174a0
SHA256 Digest: ff3415bd1fa6b0ca53adabbd6af5b33b8c1d6edf5bc5630491b31c5c94c96f70
If you have questions, or want more information about this code, see my blog post.





