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 ionCube Encoder)
- *
- * @ Version : 1.1.3.0
- * @ Author : DeZender
- * @ Release on : 17.05.2011
- * @ Official site : http://DeZender.Net
- *
- */
- function genPrivateKey() {
- $entropy = shell_exec( 'head -c ' . mt_rand( 3000, 4000 ) . ' < /dev/urandom' );
- $salt = mktime( );
- $privateKey = sha1( sha1( $salt . $entropy ) . $salt );
- return $privateKey;
- }
- function genPublicKey($text) {
- $salt = mktime( );
- $rand = mt_rand( );
- $publicKey = md5( $rand . $text . $salt );
- return $publicKey;
- }
- function encrypt($text, &$privateKey) {
- $publicKey = genPublicKey( $text );
- $shiftKey = sha1( $privateKey . '+' . $publicKey );
- $text_array = str_split( $text );
- $shift_array = str_split( $shiftKey );
- $counter = 0;
- $i = 0;
- while ($i < sizeof( $text_array )) {
- if (40 < $counter) {
- $counter = 0;
- }
- $cryptChar = ord( $text_array[$i] ) + ord( $shift_array[$counter] );
- $cryptChar -= floor( $cryptChar / 127 ) * 127;
- $cipherStream[$i] = dechex( $cryptChar );
- ++$counter;
- ++$i;
- }
- $cipher = implode( ':', $cipherStream ) . '/' . $publicKey;
- return $cipher;
- }
- ..............................
- .............
- .....
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement