Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function HMAC(key: Buffer, msg: Buffer, alg: string): Buffer {
return Hashes.createHmac(alg, key)
.update(msg)
.digest() as Buffer;
}