lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> I spent all of yesterday translating 32-bit ISAAC to Lua

Another good exercise would be the cryptographic hash functions,
such as MD5 or SHA2 from this for C code instance
	http://www.opensource.apple.com/source/OpenSSL098/OpenSSL098-35/src/crypto/sha/sha512.c
	http://www.saphir2.com/sphlib/
	https://polarssl.org

FWIW, the referenc doc on SHA <http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf> defines the bitwise operations and says this in section 2.2.2::

	>> Right-shift operation, where x >> n is obtained by discarding the right- most n bits of the word x and then padding the result with n zeroes on the left.