Implemented SHA256 hash helper function

pull/253/head
nicolas 2021-06-06 01:29:27 +02:00
parent e49a652afa
commit a5e750eae7
1 changed files with 10 additions and 0 deletions

10
lib/sha256.ts Normal file
View 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;