Instead of improperly modding by 0xFFFFFFFF in sha1 algorithm, changed to mod by 1<<32. Also committing some test code here in case I need it again.