Loading Please wait...

zCryptObj Class Reference
[Zigmoyd Encryption System.]

The main class that holds all encryption decryption methods But not needed to use it as an object cause equivalent objects are aviliable for all methods of this class. More...

Inheritance diagram for zCryptObj:

Inheritance graph
[legend]
Collaboration diagram for zCryptObj:

Collaboration graph
[legend]

Public Member Functions

 zCryptObj ()
 __construct ()
 small_enc ($string)
 Zigmoyd's Internal function.
 small_dcd ($string)
 Zigmoyd's Internal function.

Data Fields

 $skey

Detailed Description

The main class that holds all encryption decryption methods But not needed to use it as an object cause equivalent objects are aviliable for all methods of this class.

Definition at line 76 of file sec.php.


Constructor & Destructor Documentation

zCryptObj::__construct (  ) 

Definition at line 82 of file sec.php.

Referenced by zCryptObj().

00082                         {
00083     parent::__construct();
00084     $tmp_ini_key = parse_ini_file(ZIGROOT.DRS.Z_DIR_PROJECTS.DRS.Z_PROJECT_DIR.DRS.ZIGSETTINGSDIR.DRS.'zcpt.ini.php', false);
00085     $this->skey = $tmp_ini_key['key'];
00086   }


Member Function Documentation

zCryptObj::zCryptObj (  ) 

Definition at line 79 of file sec.php.

References __construct().

00079                       {
00080     $this->__construct();
00081   }

Here is the call graph for this function:

zCryptObj::small_enc ( string  ) 

Zigmoyd's Internal function.

For internal use only.

Parameters:
$string string
Returns:
string

Definition at line 94 of file sec.php.

Referenced by small_dcd().

00094                              {
00095     $key = $this->skey;
00096     for($i=0; $i<=strlen($string)-1; $i++){
00097       for($j=0; $j<=strlen($key)-1; $j++){
00098         $string[$i] = $string[$i]^$key[$j];
00099       }
00100       if($i != 0 && $i != strlen($string)-1){
00101         $string[$i] = $string[$i]^$string[$i-1]^$string[$i+1];
00102       }
00103     }
00104    return $string;
00105   }

zCryptObj::small_dcd ( string  ) 

Zigmoyd's Internal function.

For internal use only.

Parameters:
$string string
Returns:
string

Definition at line 113 of file sec.php.

References small_enc().

00113                              {
00114     $key = $this->skey;
00115     for($i=strlen($string)-1; $i>=0; $i--){
00116       if($i == 0 || $i == strlen($string)-1){
00117         for($j=0; $j<=strlen($key)-1; $j++){
00118           $string[$i] = $string[$i]^$key[$j];
00119         }
00120       }else{
00121         $string[$i] = $this->small_enc($string[$i], $key)^$string[$i-1]^$string[$i+1];
00122       }
00123     }
00124     return (int)$string;
00125   }

Here is the call graph for this function:


Field Documentation

zCryptObj::$skey

Definition at line 77 of file sec.php.


The documentation for this class was generated from the following file:

Generated on Mon Oct 27 23:53:46 2008 for zigmoyd.kdevelop by doxygen 1.5.6