@beenotung/tslib
Version:
utils library in Typescript
12 lines • 360 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.hash = void 0;
const crypto_1 = require("crypto");
function hash(content, algorithm = 'sha256') {
const stream = crypto_1.createHash(algorithm);
stream.write(content);
stream.end();
return stream.read();
}
exports.hash = hash;
//# sourceMappingURL=hash.js.map