A simple SHA-256 / SHA-224 hash function for JavaScript supports UTF-8 encoding.