UNPKG

awesome-rtk

Version:
11 lines 459 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.awsCognitoSecretHash = void 0; const crypto_1 = require("crypto"); const awsCognitoSecretHash = (username, clientId, clientSecret) => { const hasher = (0, crypto_1.createHmac)('sha256', clientSecret); hasher.update(`${username}${clientId}`); return hasher.digest('base64'); }; exports.awsCognitoSecretHash = awsCognitoSecretHash; //# sourceMappingURL=hash.js.map