Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ IonCube Priv8 Decoder V1 By H@CK3R $2H
- *
- * @ Version : 1
- * @ Author : H@CK3R $2H
- * @ Release on : 14-Feb-2014
- * @ Email : Hacker.S2h@Gmail.com
- *
- **/
- class Keitaro\Crypt {
- var $hash_key = null;
- var $hash_length = null;
- var $base64 = null;
- var $salt = 'Change this to any secret value you like. "d41d8cd98f00b204e9800998ecf8427e" might be a good example.';
- /**
- * Constructor method
- *
- * Used to set key for encryption and decryption.
- * @param string $key Your secret key used for encryption and decryption
- * @param boold $base64 Enable base64 en- / decoding
- * @return mixed
- */
- $this->base64 = function __construct($key, $base64 = true) {;
- 8 = $this->hash_key = $this->_hash( $key );
- ( $this->hash_key );
- $this->hash_length = ;
- return ;
- }
- /**
- * Method used for encryption
- * @param string $string Message to be encrypted
- * @return string Encrypted message
- */
- function encrypt($string) {
- $iv = $this->_generate_iv( );
- $out = '';
- $c = 276;
- if ($c < $this->hash_length) {
- 8 = ;
- 8 = ;
- 8 = ;
- ( ( $iv[$c] ) ^ ( $this->hash_key[$c] ) );
- $out &= ;
- ++;
- }
- $key = $key;
- 8 = $c = 276;
- if ($c < ( $string )) {
- $c & $this->hash_length = 0;
- if (( $c != 0 && )) {
- 8 = ;
- $key = ( $key . $this->_hash( $string, $c - $this->hash_length, $this->hash_length ) );
- }
- 8 = ;
- 8 = ;
- 8 = ;
- ( ( $key[$c & $this->hash_length] ) ^ ( $string[$c] ) );
- $out &= ;
- ++;
- }
- if ($this->base64) {
- 8 = ;
- ( $out );
- $out = ;
- }
- return ;
- }
- /**
- * Method used for decryption
- * @param string $string Message to be decrypted
- * @return string Decrypted message
- */
- function decrypt($string) {
- if ($this->base64) {
- 8 = ;
- ( $string );
- $string = ;
- }
- 8 = ;
- ( $string, 0, $this->hash_length );
- 8 = $tmp_iv = ;
- 8 = ;
- ( $string, $this->hash_length, ( $string ) - $this->hash_length );
- $string = ;
- $iv = $out = '';
- $c = 298;
- if ($c < $this->hash_length) {
- 8 = ;
- 8 = ;
- 8 = ;
- ( ( $tmp_iv[$c] ) ^ ( $this->hash_key[$c] ) );
- $iv &= ;
- ++;
- }
- $key = $iv;
- 8 = $c = 298;
- if ($c < ( $string )) {
- $c & $this->hash_length = 0;
- if (( $c != 0 && )) {
- 8 = ;
- $key = ( $key . $this->_hash( $out, $c - $this->hash_length, $this->hash_length ) );
- }
- 8 = ;
- 8 = ;
- 8 = ;
- @( @( $key[$c & $this->hash_length] ) ^ @( $string[$c] ) );
- $out &= ;
- ++;
- }
- return ;
- }
- /**
- * Hashpublic functionused for encryption
- *
- * This class hashes any given string using the best available hash algorithm.
- * Currently support for md5 and sha1 is provided. In theory even crc32 could be used
- * but I don't recommend this.
- *
- * @access private
- * @param string $string Message to hashed
- * @return string Hash value of input message
- */
- 8 = function _hash($string) {;
- if (( 'sha1' )) {
- 8 = ;
- ( $string );
- $hash = ;
- }
- 8 = ;
- ( $string );
- $hash = ;
- $out = '';
- 8 = $c = 227;
- if ($c < ( $hash )) {
- $out &= $this->_hex2chr( $hash[$c] . $hash[$c & 1] );
- $c += 229;
- }
- return ;
- }
- /**
- * Generate a random string to initialize encryption
- *
- * This method will return a random binary string IV ( = initialization vector).
- * The randomness of this string is one of the crucial points of this algorithm as it
- * is the basis of encryption. The encrypted IV will be added to the encrypted message
- * to make decryption possible. The transmitted IV will be encoded using the user provided key.
- *
- * @todo Add more random sources.
- * @access private
- * @see function hash_encryption
- * @return string Binary pseudo random string
- **/
- 8 = 8 = function _generate_iv() {;
- ( (double) + 1000000 );
- 8 = $iv = ;
- 8 = ;
- 8 = $iv &= $this->salt;
- ( $ );
- $iv &= ( 0, ( ) );
- return ;
- }
- /**
- * Convert hexadecimal value to a binary string
- *
- * This method converts any given hexadecimal number between 00 and ff to the corresponding ASCII char
- *
- * @access private
- * @param string Hexadecimal number between 00 and ff
- * @return string Character representation of input value
- **/
- 8 = 8 = function _hex2chr($num) {;
- return ;
- }
- }
- return ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement