2.4.1.5. Node Js
const
crypto
=
require
(
'crypto'
);
function
computeHmacSha512
(plainText, secretKey) {
const
hmac
=
crypto
.
createHmac
(
'sha512'
,
secretKey
);
hmac
.
update
(
plainText
);
return
hmac
.
digest
(
'base64'
);
}