Changeset 2048853
- Timestamp:
- 03/12/2019 08:41:35 AM (7 years ago)
- File:
-
- 1 edited
-
pmpro-paytm-gateway/trunk/classes/function.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pmpro-paytm-gateway/trunk/classes/function.php
r2002802 r2048853 3 3 { 4 4 $key = html_entity_decode($ky); 5 $size = mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, 'cbc'); 6 $input = pmproPaytm_pkcs5_pad($input, $size); 7 $td = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', 'cbc', ''); 8 $iv = "@@@@&&&&####$$$$"; 9 mcrypt_generic_init($td, $key, $iv); 10 $data = mcrypt_generic($td, $input); 11 mcrypt_generic_deinit($td); 12 mcrypt_module_close($td); 13 $data = base64_encode($data); 5 $iv = "@@@@&&&&####$$$$"; 6 $data = openssl_encrypt ( $input , "AES-128-CBC" , $key, 0, $iv ); 14 7 return $data; 15 8 } … … 17 10 function pmproPaytm_decrypt($crypt, $ky) 18 11 { 19 $crypt = base64_decode($crypt);20 12 $key = html_entity_decode($ky); 21 $td = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', 'cbc', ''); 22 $iv = "@@@@&&&&####$$$$"; 23 mcrypt_generic_init($td, $key, $iv); 24 $decrypted_data = mdecrypt_generic($td, $crypt); 25 mcrypt_generic_deinit($td); 26 mcrypt_module_close($td); 27 $decrypted_data = pmproPaytm_pkcs5_unpad($decrypted_data); 28 $decrypted_data = rtrim($decrypted_data); 29 return $decrypted_data; 13 $iv = "@@@@&&&&####$$$$"; 14 $data = openssl_decrypt ( $crypt , "AES-128-CBC" , $key, 0, $iv ); 15 return $data; 30 16 } 31 17
Note: See TracChangeset
for help on using the changeset viewer.