http://www.cnblogs.com/elaron/archive/2013/04/09/3010375.html
js部分:
<html> <head></head> <body> <script type="text/javascript" src="sha256.js"> </script> <script type="text/javascript"> document.write(sha256_digest("hello world")); </script> </body> </html>
js文件 见博客园上传文件