Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $password_x = "
- +7):;25<%]~78413899672afeec
- 3736306831e9d13c13a3cw3%N:<
- W7L!|E7:_*$[m}341#R4%}f7751
- j@^!'&f40<5#e63892cfadbed1c
- 315f32c55e2888487x2&Q[,4k2{
- ,&$:e6&:[)'*j&48-H^Y1zO@8xq
- ";
- $key = pack('H*', $password_x);
- $key_x = base64_encode(substr($password_x, 3, 6)) . pack('H*', sha1(substr($password_x, 5, 10))) . md5($key) . "^#^" . $key;
- $password = $key_x;
- function encrypt_x($text)
- {
- global $password;
- $key_x = $password;
- $key_size = strlen($key_x);
- $plaintext = $text;
- $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
- $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
- $ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key_x, $plaintext, MCRYPT_MODE_CBC, $iv);
- $ciphertext = $iv . $ciphertext;
- $ciphertext_base64 = base64_encode($ciphertext);
- return $ciphertext_base64;
- }
- function decrypt_x($text)
- {
- global $password;
- $key_x = $password;
- $ciphertext_dec = base64_decode($text);
- $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
- $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
- $iv_dec = substr($ciphertext_dec, 0, $iv_size);
- $ciphertext_dec = substr($ciphertext_dec, $iv_size);
- $plaintext_dec = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key_x, $ciphertext_dec, MCRYPT_MODE_CBC, $iv_dec);
- return $plaintext_dec;
- }
- $crypt_text = encrypt_x("sCRiPTz-TEAM.iNFO");
- $decrypt_text = decrypt_x($crypt_text);
- echo "Encypted: " . $crypt_text . "<br/><br/>";
- echo "Decrypted: " . $decrypt_text . "<br/><br/>";
- echo "Password: <pre>" . $password . "</pre>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement