Go to file
David 1657b39fb7 add sha1 function 2017-09-03 21:59:49 -04:00
README.md fix that embed, of course github doesn't allow that 2017-08-29 20:38:56 -04:00
shamwow.rb add sha1 function 2017-09-03 21:59:49 -04:00
shamwow_test.rb add sha1 function 2017-09-03 21:59:49 -04:00

README.md

SHAmwow

Sometimes you just want to understand how an algorithm works, so you implement it yourself.

The sha2 function in shamwow.rb implements the SHA-256 hashing function in Ruby. shamwow_test.rb contains a few sanity tests for the right-rotate function and for SHA2 itself, testing against the output of the Digest::SHA2.hexdigest method in the Ruby standard library.

It should go without saying that this was just for fun, and you should never, ever roll-your-own cryptography primatives for any reasonable purpose!

This was fun.

Sources

Obligatory

ShamWOW