UNPKG

@launchdarkly/js-server-sdk-common-edge

Version:
22 lines 667 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const cryptoJSHasher_1 = require("./cryptoJSHasher"); const cryptoJSHmac_1 = require("./cryptoJSHmac"); /** * Uses crypto-js as substitute to node:crypto because the latter * is not yet supported in some runtimes. * https://cryptojs.gitbook.io/docs/ */ class EdgeCrypto { createHash(algorithm) { return new cryptoJSHasher_1.default(algorithm); } createHmac(algorithm, key) { return new cryptoJSHmac_1.default(algorithm, key); } randomUUID() { return crypto.randomUUID(); } } exports.default = EdgeCrypto; //# sourceMappingURL=index.js.map