Rely on pure Lua SHA-224/SHA-256 implementation in hash() function.