246: replaced jsSHA with asmCrypto.js SHA-512, and streamlined hashing code
some minor style clean ups