Implemented SHA256 hash helper function
This commit is contained in:
10
lib/sha256.ts
Normal file
10
lib/sha256.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
const crypto = require('crypto');
|
||||
|
||||
function sha256(input: string): string {
|
||||
return crypto
|
||||
.createHash('sha256')
|
||||
.update(input)
|
||||
.digest("hex");
|
||||
}
|
||||
|
||||
export default sha256;
|
||||
Reference in New Issue
Block a user