Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 331 Bytes
624088c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import { createHash } from 'node:crypto'
/**
* Returns a SHA256 hash using SHA-3 for the given `content`.
*
* @see https://en.wikipedia.org/wiki/SHA-3
*
* @param {String} content
*
* @returns {String}
*/
export function computeSha256(strContent: string) {
return createHash('sha3-256').update(strContent).digest('hex')
} |