Created
November 7, 2021 18:38
-
-
Save CypherpunkSamurai/d43c0d3a01871e8b7d07fdba828446a1 to your computer and use it in GitHub Desktop.
A Typescript Code to generate SHA1 hash with pure js jhash module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// uses jhash to generate SHA1 (https://www.npmjs.com/package/jhash) | |
// `npm install jhash` | |
var Hashes = require('jshashes'); | |
var str = 'This is a sample text!'; | |
new SHA1 instance and base64 string encoding | |
use SHA1.hex(str) for hex encoding | |
var SHA1 = new Hashes.SHA1().b64(str); | |
new Notice(SHA1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment