Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function decrypt_db_password ($db_pass, $ispcp_db_pass_key, $ispcp_db_pass_iv) {
- if ($db_pass == '')
- return '';
- $i = 1;
- if (extension_loaded('mcrypt') || @dl('mcrypt.' . PHP_SHLIB_SUFFIX)) {
- $text = @base64_decode($db_pass . "\n");
- // Open the cipher
- $td = @mcrypt_module_open ('blowfish', '', 'cbc', '');
- // Create key
- $key = $ispcp_db_pass_key;
- // Create the IV and determine the keysize length
- $iv = $ispcp_db_pass_iv;
- // Intialize encryption
- @mcrypt_generic_init ($td, $key, $iv);
- // Decrypt encrypted string
- $decrypted = @mdecrypt_generic ($td, $text);
- @mcrypt_module_close ($td);
- // Show string
- return trim($decrypted);
- } else {
- die();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment