UNPKG

@beenotung/tslib

Version:
8 lines (7 loc) 256 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.hash = hash; const crypto_1 = require("crypto"); function hash(content, algorithm = 'sha256') { return (0, crypto_1.createHash)(algorithm).update(content).digest(); }