To properly display this page you need a browser with JavaScript support.
Electronic Invoicing System API v1
Developers Guide
×
Menu
Index
Search
Search
2. Terminologies
2.4. HMAC-SHA512
2.4.1. HMAC Implementation Examples
2.4.1.3. PHP
Previous page
Next page
Print version
©
Malawi Revenue Authority - ICT Research and Innovations, 2024
To properly display this page you need a browser with JavaScript support.
2.4.1.3. PHP
function
computeHmacSha512
($plainText, $secretKey) {
$
hash
=
hash_hmac
(
"sha512"
, $
plainText
, $
secretKey
,
true
);
return
base64_encode
($
hash
);
}