Moving from PTK to Luna and now in code, I need to pass cbc_param
, before the inside object was the only mechanism.
Can somebody explain what is this about?
How PTK manage cbc_param
?
What is the difference with and without cbc_param
?
var cbc_param = pkcs11.C_GenerateRandom(new Buffer(16));
pkcs11.C_EncryptInit(
session,
{
mechanism: pkcs11js.CKM_AES_CBC,
parameter: cbc_param
},
secretKey
);