juice-shop-ctf-cli
Version:
Capture-the-Flag (CTF) environment setup tools for OWASP Juice Shop
15 lines (12 loc) • 386 B
JavaScript
/*
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
* SPDX-License-Identifier: MIT
*/
const jsSHA = require('jssha')
function hmacSha1 (secretKey, text) {
const shaObj = new jsSHA('SHA-1', 'TEXT') // eslint-disable-line new-cap
shaObj.setHMACKey(secretKey, 'TEXT')
shaObj.update(text)
return shaObj.getHMAC('HEX')
}
module.exports = hmacSha1