UNPKG

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

Version:
19 lines 541 B
import CryptoJSHasher from './cryptoJSHasher'; import CryptoJSHmac from './cryptoJSHmac'; /** * Uses crypto-js as substitute to node:crypto because the latter * is not yet supported in some runtimes. * https://cryptojs.gitbook.io/docs/ */ export default class EdgeCrypto { createHash(algorithm) { return new CryptoJSHasher(algorithm); } createHmac(algorithm, key) { return new CryptoJSHmac(algorithm, key); } randomUUID() { return crypto.randomUUID(); } } //# sourceMappingURL=index.js.map