SHA-1 JS implementation abstraction