Refactor crypto.js Hash stuff a bit.