@azure/eventgrid
Version:
An isomorphic client library for the Azure Event Grid service.
14 lines • 507 B
JavaScript
;
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.sha256Hmac = sha256Hmac;
const node_crypto_1 = require("node:crypto");
/**
* @internal
*/
async function sha256Hmac(secret, stringToSign) {
const decodedSecret = Buffer.from(secret, "base64");
return (0, node_crypto_1.createHmac)("sha256", decodedSecret).update(stringToSign).digest("base64");
}
//# sourceMappingURL=cryptoHelpers.js.map