UNPKG

xsolla

Version:

A Node.js client for working with the Xsolla Merchant API

12 lines (11 loc) 436 B
"use strict"; 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")); exports.default = (algorithm, string) => { const sum = crypto_1.default.createHash(algorithm); sum.update(string); return sum.digest('hex'); };