@hounddesk/epayco-signature-verifier
Version:
ePayco Signature verifier used for transactions integrity checks
12 lines • 510 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const crypto_1 = __importDefault(require("crypto"));
function hash({ data, hashType }) {
const hash = crypto_1.default.createHash(hashType.algorithm);
return hash.update(data, hashType.encoding).digest(hashType.digestEncoding);
}
exports.default = hash;
//# sourceMappingURL=hash.js.map