Formatting output Plese Wait...
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...
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().
Show Source00082 {
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 }
Top
Member Function Documentation
zCryptObj::small_enc( string $string )
Zigmoyd's Internal function.
For internal use only.
- Parameters:
-
- Returns:
- string
Definition at line 94 of file sec.php.
Referenced by small_dcd().
Show Source00094 {
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 }
Top
zCryptObj::small_dcd( string $string )
Zigmoyd's Internal function.
For internal use only.
- Parameters:
-
- Returns:
- string
Definition at line 113 of file sec.php.
References small_enc().
Show Source00113 {
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 }
Top
Field Documentation
The documentation for this class was generated from the following file: