forked from Tysonic/EfrisOnlineMode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.php
22 lines (17 loc) · 3.42 KB
/
main.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
include("Utils.php");
$utils = new Utils();
$passowrdDess = "TY6f/TmApx048AVIeVVDh+riV/7tFbmGl83bblO52BeYCHnqcB5VQ7lwEQqAwyLR2yQR/AhsGMWHH3RX6oHaMTZg+mxKFr4OnZostVI6zl2ERG6rdCiHTwbw33vh9fBnvamkaeAGfMqklmSgcjsX7MsaLacke7W1K6lEaLTpRJd5WA8XUiGjbDxFB7DvhuEgqJUu+AguDASKkxCsA46yvix7hbPnGD10adBws2vYFwPQb8g6Q2gUqzz+H825KFKXQnTlUNdvldtxJzKZ6x1EQciufXqN5ODIeV7ctmH8mCkOQCgWw0OyH50ISB5dUE11aVHH8fRQTR4IXf9mgAQZIQ==";
$filename = "./leader.p12";
$passPhrase = "123";
$stringVal="{\"invoiceNo\":\"321017996188\"}";
$aes = $utils->getAESKey($passowrdDess, $filename,$passPhrase);
//$encrypted_string = $utils->encrypt($aes, $stringVal);
$pi_key = $utils->getPrivKey($filename,$passPhrase);
$resp = "PM8BcSL+Lt+84iVpf58BWQdR+xwC0bgbVtRaojHVZntYauUkws8hXFeh/DQaFde4EvrMPi1VOnd3svQNfRe2X/ntLeCOX+Kxsb1IUbK7hduh6HhFrFG+MMZc2yUtxQzZgZn67e2iyUZPD3nBIiS41lqNiV7NUwySPt+VHxcwIAc99D48sIZlk8K3cUUIjuwYQ5Sr2wQEQpTlUdK3hQUZv1ouEQ1ahkq36Neb4b9R6qAtxqDq4H73BSBz0geM1yNHubav7KLMjr0iS893HDGWqqyob+GzFGyzOLWQcSaYMpzGq/xHJ20Hbbthwgy6OG2rPbIYcHx6qlwwzG7T4Bcl/GwddCglc/HqjnKqbX29lVzzN9jkfXEC6Uo5UzLpurhvCaznvZ4+WlVrSi+TGU2JKkicipT7qrKYtFqBQZli9Y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ehftyLDnhZelSIrpp8Ofr/DdOFMwhtV6NmRZqy/JK0qXRza94YoRJdaUpoHr++SK0VE9AvY/tDLXc/gAx69+v4/CIj3T1bmJMPSLoBCnLVfbypee3uyWg+P2UWPpej0+02Fb8sfoQg+qV2bq87Xww/7jcLDyvgByAlILtwlpppNaJvtcYIZDdwTOyJMlD+Xx8tuyEahsLbwhHhVCWP6Qvk3RphWeObIDHzHgLJn2/CdnvVHpkqA9JPux4TgwTD2LAZi2cGCQhqxPEpM5h+VsYqvK1eCrxz0OBtH2jwOaYfeB/pJ2elBUvMzgB7VnLEeSJMoyarI+RlJQkN8zgcpyqsGvrBDdIifrN+45pLcuo6gQJieDAeiCo1sslpZTe7ZKAQ8dbd0Fh41gQVU9t0XpxWE6UM5M1zgwtIpStSVGY5jU4YAc7X5vkwwkhGfgsmKJKjtrNLRIXX1DgulpZWS920XLbt4Pw0DZSjBtul8Cc1+fOM/7QsalCbqbdvAlW8TX3J6yTw/mz9NWohKv5k/MaxThwtvLcoTX5Qz9IhqcY6IV0MtbQdvx/AwgytX7XXTKczBrezP1It44ZQT/Aw65IUXqyk1KRc2yDGnoeV/X4r78Ply393sIkbaJvzm/nIZh4Zn6euIv96RDcNzWL09HZwizs9Ju1Ac/TDV0WMYQkhJtCqrH7ceObvdG9JPJxBjNMPRUtRN6z38AHC1YFJoKUWw31KMX7QoUNRbTxXcqPMqLowasLHJQcUnEMhvlTijyD94vdVnWF/lSF4hsNXSRu8yH/avWIunTU0tvl4gsJJa5Y5RPYYtn0pmyEE2ROq0XlmzDziXS18FAJEPO8NDmR/dd9jddoeb354xsMR3in3Q5r8TzmKUAbaM7uRrd2yeA6Lg1Uh99dEZfAh3/KQncMV86wEGRspAhwIaMEFxlROq3bMu9YimUYi4bIC7ifSMhLotsZg465qVGXV5Tw8cGle5WVF1YfFCqE";
$decrypted_string = $utils->decrypt(base64_decode($aes), $resp);
//echo "The Encrypted String is:". $encrypted_string;
echo "The Decrypted String is:" . $decrypted_string;
//$Signature = $utils->sign($encrypted_string,$pi_key);
echo "\n------------\n";
//echo "The signature is ". base64_encode($Signature);