Files
ETAApi/v2/server/src/Shared/ShaUtils.js
2024-08-05 15:56:23 -06:00

13 lines
279 B
JavaScript

"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 };