SHA1 JS implementation