Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for Zend Encoder/SafeGuard & PhpExpress)
- *
- * @ Version : 1.1.6.0
- * @ Author : DeZender
- * @ Release on : 02.06.2013
- * @ Official site : http://DeZender.Net
- *
- */
- class C_blowfish {
- public $B64 = './0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
- private static $instance = null;
- static public function getInstance() {
- if (!isset( $instance )) {
- $c = 'C_blowfish';
- $instance = new $c( );
- }
- return $instance;
- }
- public function bytetoB64($ec) {
- $dc = '';
- $k = -1;
- while ($k < strlen( $ec ) - 1) {
- $k++;
- $left = ord( $ec[$k] ) << 24;
- $k++;
- $left += ord( $ec[$k] ) << 16;
- $k++;
- $left += ord( $ec[$k] ) << 8;
- $k++;
- $left += ord( $ec[$k] );
- $k++;
- $right = ord( $ec[$k] ) << 24;
- $k++;
- $right += ord( $ec[$k] ) << 16;
- $k++;
- $right += ord( $ec[$k] ) << 8;
- $k++;
- $right += ord( $ec[$k] );
- for ($i = 0; $i < 6; $i++) {
- $dc .= $this->B64[$right & 63];
- $right = $right >> 6;
- }
- for ($i = 0; $i < 6; $i++) {
- $dc .= $this->B64[$left & 63];
- $left = $left >> 6;
- }
- }
- return $dc;
- }
- public function B64tobyte($ec) {
- $dc = '';
- $k = -1;
- while ($k < strlen( $ec ) - 1) {
- $right = 0;
- $left = 0;
- for ($i = 0; $i < 6; $i++) {
- $k++;
- $right |= @strpos( $this->B64, $ec[$k] ) << $i * 6;
- }
- for ($i = 0; $i < 6; $i++) {
- $k++;
- $left |= @strpos( $this->B64, $ec[$k] ) << $i * 6;
- }
- for ($i = 0; $i < 4; $i++) {
- $dc .= chr( ( $left & 255 << ( 3 - $i ) * 8 ) >> ( 3 - $i ) * 8 );
- }
- for ($i = 0; $i < 4; $i++) {
- $dc .= chr( ( $right & 255 << ( 3 - $i ) * 8 ) >> ( 3 - $i ) * 8 );
- }
- }
- return $dc;
- }
- public function encrypt($text, $key) {
- $td = @mcrypt_module_open( MCRYPT_BLOWFISH, '', MCRYPT_MODE_ECB, '' );
- $iv = @mcrypt_create_iv( @mcrypt_enc_get_iv_size( $td ), MCRYPT_DEV_URANDOM );
- ...........................................................
- .........................
- ........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement