Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
kdfparams,
mac: hashjs
// @ts-ignore
.hmac(hashjs.sha256, derivedKey, 'hex')
.update(
Buffer.concat([
derivedKey.slice(16, 32),
ciphertext,
iv,
Buffer.from(ALGO_IDENTIFIER),
]),
'hex',
)
.digest('hex'),
},
id: uuid.v4({ random: bytes.hexToIntArray(randomBytes(16)) }),
version: 3,
});
};