UNPKG

piral-cli

Version:

The standard CLI for creating and building a Piral instance or a Pilet.

17 lines 636 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.computeHash = computeHash; exports.computeMd5 = computeMd5; exports.computeIntegrity = computeIntegrity; const crypto_1 = require("crypto"); function computeHash(content = '') { return (0, crypto_1.createHash)('sha1').update(content).digest('hex'); } function computeMd5(content = '') { return (0, crypto_1.createHash)('md5').update(content).digest('hex'); } function computeIntegrity(content) { const sum = (0, crypto_1.createHash)('sha256').update(content).digest('base64'); return `sha256-${sum}`; } //# sourceMappingURL=hash.js.map