feat: Split v1 and v2 apis
This commit is contained in:
12
v2/server/src/Shared/ShaUtils.js
Normal file
12
v2/server/src/Shared/ShaUtils.js
Normal file
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
const crypto = require('crypto');
|
||||
/**
|
||||
* Convert string to sha256 string in hex
|
||||
* @param {*} text
|
||||
* @returns
|
||||
*/
|
||||
function toSha256( text ){
|
||||
return crypto.createHmac( "sha256" , "" ).update( text ).digest( 'hex' );
|
||||
}
|
||||
|
||||
module.exports = { toSha256 };
|
||||
Reference in New Issue
Block a user