<?php
$secretKey = "merchantSecretKey";
$merchantApiKey = "merchantApiKey";
$externalOrderId = "1234";
$data = $merchantApiKey.$externalOrderId;
echo hash_hmac('sha1', 'The quick brown fox jumped over the lazy dog.', $secretKey);
/*
String secretKey = "merchantSecretKey";
String merchantApiKey = "merchantApiKey";
String externalOrderId = "1234";
String data = merchantApiKey + externalOrderId;
Mac m = Mac.getInstance("HmacSHA1");
m.init(new SecretKeySpec(secretKey.getBytes("UTF-8"), "HmacSHA1"));
byte[] hash = m.doFinal(data.getBytes("UTF-8"));
String secret = new String(Base64.encodeBase64(hash));
*/
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/IXcje
function name: (null)
number of ops: 12
compiled vars: !0 = $secretKey, !1 = $merchantApiKey, !2 = $externalOrderId, !3 = $data
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
2 0 E > ASSIGN !0, 'merchantSecretKey'
3 1 ASSIGN !1, 'merchantApiKey'
4 2 ASSIGN !2, '1234'
5 3 CONCAT ~7 !1, !2
4 ASSIGN !3, ~7
6 5 INIT_FCALL 'hash_hmac'
6 SEND_VAL 'sha1'
7 SEND_VAL 'The+quick+brown+fox+jumped+over+the+lazy+dog.'
8 SEND_VAR !0
9 DO_ICALL $9
10 ECHO $9
16 11 > RETURN 1
Generated using Vulcan Logic Dumper, using php 8.0.0
preferences:
161.4 ms | 1398 KiB | 15 Q