Generated SHA 256 HMAC

E670ACFFF020CFABB3FAF6B5606425E3E2245B17C21EB001B75CDCAA4B1CE96E



PHP code used

$data ="vpc_AccessCode=0E5BC9E7&vpc_Amount=1000&vpc_Command=pay&vpc_Locale=en&vpc_MerchTxnRef=TEST_TRN&vpc_Merchant=TESTTRINITYCOLKR&vpc_OrderInfo=123&vpc_ReturnURL=http://http://www.trinitycollege.lk/payment-confirmation/&vpc_Version=1";

// Ensure that the secure hash secret is in upper case
$secret = strtoupper("1FB01957FD24901628C71DE4F779F0CF");

// Perform SHA 256 HMAC calculation with the hash secret as hex decoded
$sha256_hmac = strtoupper(hash_hmac('sha256', $data, pack('H*', $secret)));

//Display the calculated hash
echo 'Generated SHA 256 HMAC'.$sha256_hmac;
?>