awesome-rtk
Version:
Awesome Raphael's Tool kit
11 lines • 459 B
JavaScript
;
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