UNPKG

privacy.com

Version:

Wrapper for the Privacy.com API using Axios and TypeScript

12 lines (11 loc) 529 B
"use strict"; var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; result["default"] = mod; return result; }; Object.defineProperty(exports, "__esModule", { value: true }); const crypto = __importStar(require("crypto")); exports.createHmac = (apiKey, data) => crypto.createHmac("sha256", apiKey).update(JSON.stringify(data)).digest("base64");