We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e212813 commit 87314cdCopy full SHA for 87314cd
Sha512/compute_trans_hashSHA2.php
@@ -0,0 +1,20 @@
1
+<?php
2
+
3
+$apiLogin="2Kfn5S7x7D";
4
+$transId="60115585081";
5
+$amount='12.00';
6
+$signatureKey='56E529FE6C63D60E545F84686096E6AA01D5E18A119F18A130F7CFB3983104216979E95D84C91BDD382AA0875264A63940A2D0AA5548F6023B4C78A9D52C18DA';
7
+$textToHash="^". $apiLogin."^". $transId ."^". $amount."^";
8
9
+function generateSH512($textToHash, $signatureKey)
10
+{
11
+ if ($textToHash != null && $signatureKey != null) {
12
+ $sig = hash_hmac('sha512', $textToHash, hex2bin($signatureKey));
13
+ echo " Computed SHA512 Hash: " . strtoupper($sig) . "\n";
14
+ } else {
15
+ echo "Either Signature key or the text to hash is empty \n";
16
+ }
17
+}
18
19
+generateSH512($textToHash, $signatureKey);
20
+?>
0 commit comments