Loading Please wait...

zCrypt Class Reference
[Zigmoyd Encryption System.]

Inheritance diagram for zCrypt:

Inheritance graph
[legend]
Collaboration diagram for zCrypt:

Collaboration graph
[legend]

Public Member Functions

 encrypt ($str, $base64=false)
 Encrypts a String / Array according to the settings.
 decrypt ($str, $base64=false)
 Decrypts an encrypted array / string based upon the encryption settings.
 encode ($str, $base64=false)
 Alias of encrypt().
 decode ($str, $base64=false)
 Alias of decrypt().
 enc ($str, $base64=false)
 Alias of encrypt().
 dcd ($str, $base64=false)
 Alias of decrypt().
 hash ($str)
 Hashes using the algorithm specified in Configuration file and then does bin2hex on it.
 denc ($str, $key=null)
 Dynamic Encryption.
 ddcd ($str, $key=null)
 Decrypts denc() encrypted string.
 mcrypt_aviliable ()
 Is mcrypt aviliable.
 menc ($string, $key=null)
 dynamically encrypts encrypts string using Mcrypt with Dynamically Generated IV.
 mdcd ($string, $key=null)
 Decryptor function of menc().
 tenc ($str, $key=null)
 Encrypts Strings.
 tdcd ($str, $key=null)
 decryptor function of tenc().
 encrypt ($str, $base64=false)
 Encrypts a String / Array according to the settings.
 decrypt ($str, $base64=false)
 Decrypts an encrypted array / string based upon the encryption settings.
 encode ($str, $base64=false)
 Alias of encrypt().
 decode ($str, $base64=false)
 Alias of decrypt().
 enc ($str, $base64=false)
 Alias of encrypt().
 dcd ($str, $base64=false)
 Alias of decrypt().
 hash ($str)
 Hashes using the algorithm specified in Control Panel.
 denc ($str, $key=null)
 Dynamic Encryption.
 ddcd ($str, $key=null)
 Decrypts denc() encrypted string.
 mcrypt_aviliable ()
 Is mcrypt aviliable.
 menc ($string, $key=null)
 dynamically encrypts encrypts string using Mcrypt with Dynamically Generated IV.
 mdcd ($string, $key=null)
 Decryptor function of menc().
 tenc ($str, $key=null)
 Encrypts Strings.
 tdcd ($str, $key=null)
 decryptor function of tenc().

Detailed Description

Zigmoyd Encryption System. Encrypts using your current encryption settings and driver.

Definition at line 39 of file zCrypt.doc.php.


Member Function Documentation

zCrypt::encrypt ( str,
base64 = false 
)

Encrypts a String / Array according to the settings.

on encryption decryption on your Control Panel . If array given returns ther encrypted array else returns the encrypted array. If integer or float given Converts it to string and then encrypts it. if second argument(boolian true / false(By default)) is applied (as true) base64_encode on the encrypted text before returning. Remember that Output would be Same always if the Same source String is Supplied and Settings are same. as it Stores the IV(Initialization vector) in its settings file and use that Stored IV if any mode other than ecb is used (NOE : To use Dynamacally generated IV use denc(), menc(), or tenc() )

Parameters:
$str mixed
$base64 boolean
Returns:
mixed

Definition at line 53 of file zCrypt.doc.php.

Referenced by enc(), encode(), encrypt(), hash(), zSession::setEncrypted(), and zCookie::setEncrypted().

00053                                          {
00054     global ${Z_IN_CRYPT_VAR_NAME};
00055     $crypt = &${Z_IN_CRYPT_VAR_NAME};
00056     if(!is_array($str)){
00057       if($base64){
00058         return base64_encode($crypt->encrypt((string)$str));
00059       }
00060       return $crypt->encrypt((string)$str);
00061     }else{
00062       if(array_walk_recursive($str, array('zCrypt', 'encrypt'), array_pad(array(), count($str), $base64)))
00063         return $str;
00064       else
00065         return false;
00066     }
00067   }

zCrypt::decrypt ( str,
base64 = false 
)

Decrypts an encrypted array / string based upon the encryption settings.

on your configuration file if second argument(boolian true / false(By default)) is applied (as true) base64 before decrypting the text. returns decrypted String if string given else return decrypted array

Parameters:
$str mixed
$base64 bool
Returns:
mixed

Definition at line 77 of file zCrypt.doc.php.

References $val.

Referenced by dcd(), decode(), decrypt(), zSession::getEncrypted(), and zCookie::getEncrypted().

00077                                          {
00078     global ${Z_IN_CRYPT_VAR_NAME};
00079     $crypt = &${Z_IN_CRYPT_VAR_NAME};
00080     if(!is_array($str)){
00081       if($base64){
00082         return $crypt->decrypt(base64_decode($str));
00083       }
00084       return $crypt->decrypt((string)$str);
00085     }else{
00086       foreach($str as $key => $val){
00087         $str[$key] = zCrypt::decrypt($val, $base64);
00088       }
00089       return $str;
00090     }
00091   }

zCrypt::encode ( str,
base64 = false 
)

Alias of encrypt().

Parameters:
$str string
$base64 bool
Returns:
string

Definition at line 99 of file zCrypt.doc.php.

References encrypt().

00099                                         {
00100     return zCrypt::encrypt($str, $base64);
00101   }

Here is the call graph for this function:

zCrypt::decode ( str,
base64 = false 
)

Alias of decrypt().

Parameters:
$str string
$base64 bool
Returns:
string

Definition at line 109 of file zCrypt.doc.php.

References decrypt().

00109                                         {
00110     return zCrypt::decrypt($str, $base64);
00111   }

Here is the call graph for this function:

zCrypt::enc ( str,
base64 = false 
)

Alias of encrypt().

Parameters:
$str string
$base64 bool
Returns:
string

Definition at line 119 of file zCrypt.doc.php.

References encrypt().

00119                                      {
00120     return zCrypt::encrypt($str, $base64);
00121   }

Here is the call graph for this function:

zCrypt::dcd ( str,
base64 = false 
)

Alias of decrypt().

Parameters:
$str string
$base64 bool
Returns:
string

Definition at line 129 of file zCrypt.doc.php.

References decrypt().

00129                                      {
00130     return zCrypt::decrypt($str, $base64);
00131   }

Here is the call graph for this function:

zCrypt::hash ( str  ) 

Hashes using the algorithm specified in Configuration file and then does bin2hex on it.

and then encrypts it (If Encryption on Hashing Specified in configuration file). and returns the Hashed string CURRENTLY dosn't accept arrays

Parameters:
$str string
Returns:
string

Definition at line 141 of file zCrypt.doc.php.

References encrypt().

00141                      {
00142     switch(Z_HASH_ALGO){
00143       case 'Z__php_str_md5':
00144         $ret = md5($str);
00145       break;
00146       case 'Z__php_str_sha1':
00147         $ret = sha1($str);
00148       break;
00149       default:
00150         $ret = bin2hex(mhash(Z_HASH_ALGO, $str));
00151       break;
00152     }
00153     if(!Z_HASH_ENC){
00154       return $ret;
00155     }else{
00156       return zCrypt::encrypt($ret, true);
00157     }
00158   }

Here is the call graph for this function:

zCrypt::denc ( str,
key = null 
)

Dynamic Encryption.

A New IV(Initilization vector) is generated each time this function is invoked and it gets Encrypted with that Newly generated IV. So remember the output of teh Resultant encrypted string would be different each time even if teh Source string is Same. It uses teh Key that you set on Configuration File

Parameters:
$str string
$expiry int
Returns:
string

Definition at line 169 of file zCrypt.doc.php.

References perror().

00169                                   {
00170     global ${Z_IN_CRYPT_VAR_NAME};
00171     $crypt = &${Z_IN_CRYPT_VAR_NAME};
00172     if(!method_exists($crypt, 'denc')){
00173       perror('Sorry you must use either mcrypt or both xor and mcrypt as Encryption driver to use this function CURRENTLY');
00174       return false;
00175     }
00176     return $crypt->denc((string)$str, $key);
00177   }

Here is the call graph for this function:

zCrypt::ddcd ( str,
key = null 
)

Decrypts denc() encrypted string.

If verboae is turned on it fires error if the when the encrypted string has expired or the string is not properly encrypted

Parameters:
$encrypted_str string
$verbose bool
Returns:
string

Definition at line 186 of file zCrypt.doc.php.

References perror().

00186                                   {
00187     global ${Z_IN_CRYPT_VAR_NAME};
00188     $crypt = &${Z_IN_CRYPT_VAR_NAME};
00189     if(!method_exists($crypt, 'ddcd')){
00190       perror('Sorry you must use either mcrypt or both xor and mcrypt as Encryption driver to use this function CURRENTLY');
00191       return false;
00192     }
00193     return $crypt->ddcd($str, $key);
00194   }

Here is the call graph for this function:

zCrypt::mcrypt_aviliable (  ) 

Is mcrypt aviliable.

Returns:
bool;

Definition at line 200 of file zCrypt.doc.php.

Referenced by mdcd(), and menc().

00200                              {
00201     if(function_exists('mcrypt_module_open')){
00202       return true;
00203     }
00204     else return false;
00205   }

zCrypt::menc ( string,
key = null 
)

dynamically encrypts encrypts string using Mcrypt with Dynamically Generated IV.

Parameters:
$string string
$key string
Returns:
string

Definition at line 213 of file zCrypt.doc.php.

References $app_data, mcrypt_aviliable(), and perror().

00213                                     {
00214     global $app_data;
00215     if(!mcrypt_aviliable()){
00216       perror('Sorry Mcrypt is not aviliable');
00217       return false;
00218     }
00219     if($key == null){
00220       $data = parse_ini_file(ZIGROOT.DRS.Z_DIR_PROJECTS.DRS.Z_PROJECT_DIR.DRS.ZIGSETTINGSDIR.DRS.'mcpt.ini.php', false);
00221       $key = $data['mkey'];
00222     }
00223     srand((double) microtime() * 1000000);
00224     $key = md5($key);
00225     $key_size = mcrypt_get_key_size(SEC_MCRYPT_ALGO, SEC_MCRYPT_MODE);
00226     if(strlen($key) > $key_size){
00227       //perror("Length of the Key is too large for this algorighm<br />Supported Key size $key_size. Size of your key is ".strlen($key).". <br /> Either Select a Different Algorithm or select a Different key");
00228       $key = substr($key, 0, $key_size);
00229     }
00230     $td = mcrypt_module_open(SEC_MCRYPT_ALGO, '',SEC_MCRYPT_MODE, '');
00231     $key = substr($key, 0, mcrypt_enc_get_key_size($td));
00232     $iv_size = mcrypt_enc_get_iv_size($td);
00233     $iv = mcrypt_create_iv($iv_size, SEC_MCRYPT_IV_SRC);
00234     if(mcrypt_generic_init($td, $key, $iv) != -1){
00235       $c_t = mcrypt_generic($td, $string);
00236       mcrypt_generic_deinit($td);
00237       mcrypt_module_close($td);
00238       $c_t = $iv.$c_t;
00239       return $c_t;
00240     }
00241   }

Here is the call graph for this function:

zCrypt::mdcd ( string,
key = null 
)

Decryptor function of menc().

Parameters:
$encrypted_string string
$key string
Returns:
string

Definition at line 249 of file zCrypt.doc.php.

References mcrypt_aviliable(), and perror().

00249                                     {
00250     if(!mcrypt_aviliable()){
00251       perror('Sorry Mcrypt is not aviliable');
00252       return false;
00253     }
00254     if($key == null){
00255       $data = parse_ini_file(ZIGROOT.DRS.Z_DIR_PROJECTS.DRS.Z_PROJECT_DIR.DRS.ZIGSETTINGSDIR.DRS.'mcpt.ini.php', false);
00256       $key = $data['mkey'];
00257     }
00258     $key = md5($key);
00259     $key_size = mcrypt_get_key_size(SEC_MCRYPT_ALGO, SEC_MCRYPT_MODE);
00260     if(strlen($key) > $key_size){
00261       //perror("Length of the Key is too large for this algorighm<br />Supported Key size $key_size. Size of your key is ".strlen($key).". <br /> Either Select a Different Algorithm or select a Different key");
00262       $key = substr($key, 0, $key_size);
00263     }
00264     $td = mcrypt_module_open(SEC_MCRYPT_ALGO, '',SEC_MCRYPT_MODE, '');
00265     $key = substr($key, 0, mcrypt_enc_get_key_size($td));
00266     $iv_size = mcrypt_enc_get_iv_size($td);
00267     $iv = substr($string,0,$iv_size);
00268     $string = substr($string,$iv_size);
00269     if (mcrypt_generic_init($td, $key, $iv) != -1){
00270       $c_t = mdecrypt_generic($td, $string);
00271       mcrypt_generic_deinit($td);
00272       mcrypt_module_close($td);
00273       return $c_t;
00274     }
00275   }

Here is the call graph for this function:

zCrypt::tenc ( str,
key = null 
)

Encrypts Strings.

Such that an encrypted string is only valid for 1 second or 1 microsecond (as Customized in your Configuration File) If a Key is specified It Encrypts using that Key else Encrypts using teh key specified in Configuration File source gets encrypt with a Dynamic IV with Key = The Key Stored in Settings .(CONCAT) Curent Time (second / Microsecond)

Parameters:
$str string
$key string
Returns:
string

Definition at line 286 of file zCrypt.doc.php.

References perror().

00286                                   {
00287     global ${Z_IN_CRYPT_VAR_NAME};
00288     $crypt = &${Z_IN_CRYPT_VAR_NAME};
00289     if(!method_exists($crypt, 'tenc')){
00290       perror('Sorry you must use either mcrypt or both xor and mcrypt as Encryption driver to use this function CURRENTLY');
00291       return false;
00292     }
00293     return $crypt->tenc($str, $key);
00294   }

Here is the call graph for this function:

zCrypt::tdcd ( str,
key = null 
)

decryptor function of tenc().

Parameters:
$encrypted_string string
$key string
Returns:
string

Definition at line 302 of file zCrypt.doc.php.

References perror().

00302                                   {
00303     global ${Z_IN_CRYPT_VAR_NAME};
00304     $crypt = &${Z_IN_CRYPT_VAR_NAME};
00305     if(!method_exists($crypt, 'tenc')){
00306       perror('Sorry you must use either mcrypt or both xor and mcrypt as Encryption driver to use this function CURRENTLY');
00307       return false;
00308     }
00309     return $crypt->tdcd($str, $key);
00310   }

Here is the call graph for this function:

zCrypt::encrypt ( str,
base64 = false 
)

Encrypts a String / Array according to the settings.

on encryption decryption on your Control Panel . If array given returns ther encrypted array else returns the encrypted array. If integer or float given Converts it to string and then encrypts it. if second argument(boolian true / false(By default)) is applied (as true) base64_encode on the encrypted text before returning. Remember that Output would be Same always if the Same source String is Supplied and Settings are same. as it Stores the IV(Initialization vector) in its settings file and use that Stored IV if any mode other than ecb is used (NOE : To use Dynamacally generated IV use denc(), menc(), or tenc() )

Parameters:
$str mixed
$base64 boolean
Returns:
mixed

Definition at line 79 of file sec_func.php.

References encrypt().

00079                                          {
00080     global ${Z_IN_CRYPT_VAR_NAME};
00081     $crypt = &${Z_IN_CRYPT_VAR_NAME};
00082     if(!is_array($str)){
00083       if($base64){
00084         return base64_encode($crypt->encrypt((string)$str));
00085       }
00086       return $crypt->encrypt((string)$str);
00087     }else{
00088       if(array_walk_recursive($str, array('zCrypt', 'encrypt'), array_pad(array(), count($str), $base64)))
00089         return $str;
00090       else
00091         return false;
00092     }
00093   }

Here is the call graph for this function:

zCrypt::decrypt ( str,
base64 = false 
)

Decrypts an encrypted array / string based upon the encryption settings.

on your control panel if second argument(boolian true / false(By default)) is applied (as true) base64 before decrypting the text. returns decrypted String if string given else return decrypted array

Parameters:
$str mixed
$base64 bool
Returns:
mixed

Definition at line 103 of file sec_func.php.

References $val, and decrypt().

00103                                          {
00104     global ${Z_IN_CRYPT_VAR_NAME};
00105     $crypt = &${Z_IN_CRYPT_VAR_NAME};
00106     if(!is_array($str)){
00107       if($base64){
00108         return $crypt->decrypt(base64_decode($str));
00109       }
00110       return $crypt->decrypt((string)$str);
00111     }else{
00112       foreach($str as $key => $val){
00113         $str[$key] = zCrypt::decrypt($val, $base64);
00114       }
00115       return $str;
00116     }
00117   }

Here is the call graph for this function:

zCrypt::encode ( str,
base64 = false 
)

Alias of encrypt().

Parameters:
$str string
$base64 bool
Returns:
string

Definition at line 125 of file sec_func.php.

References encrypt().

00125                                         {
00126     return zCrypt::encrypt($str, $base64);
00127   }

Here is the call graph for this function:

zCrypt::decode ( str,
base64 = false 
)

Alias of decrypt().

Parameters:
$str string
$base64 bool
Returns:
string

Definition at line 135 of file sec_func.php.

References decrypt().

00135                                         {
00136     return zCrypt::decrypt($str, $base64);
00137   }

Here is the call graph for this function:

zCrypt::enc ( str,
base64 = false 
)

Alias of encrypt().

Parameters:
$str string
$base64 bool
Returns:
string

Definition at line 145 of file sec_func.php.

References encrypt().

00145                                      {
00146     return zCrypt::encrypt($str, $base64);
00147   }

Here is the call graph for this function:

zCrypt::dcd ( str,
base64 = false 
)

Alias of decrypt().

Parameters:
$str string
$base64 bool
Returns:
string

Definition at line 155 of file sec_func.php.

References decrypt().

00155                                      {
00156     return zCrypt::decrypt($str, $base64);
00157   }

Here is the call graph for this function:

zCrypt::hash ( str  ) 

Hashes using the algorithm specified in Control Panel.

and then does bin2hex on it. and then encrypts it (If Encryption on Hashing Specified in Control Panel). and returns the Hashed string CURRENTLY dosn't accept arrays

Parameters:
$str string
Returns:
string

Definition at line 167 of file sec_func.php.

References encrypt().

00167                      {
00168     switch(Z_HASH_ALGO){
00169       case 'Z__php_str_md5':
00170         $ret = md5($str);
00171       break;
00172       case 'Z__php_str_sha1':
00173         $ret = sha1($str);
00174       break;
00175       default:
00176         $ret = bin2hex(mhash(Z_HASH_ALGO, $str));
00177       break;
00178     }
00179     if(!Z_HASH_ENC){
00180       return $ret;
00181     }else{
00182       return zCrypt::encrypt($ret, true);
00183     }
00184   }

Here is the call graph for this function:

zCrypt::denc ( str,
key = null 
)

Dynamic Encryption.

A New IV(Initilization vector) is generated each time this function is invoked and it gets Encrypted with that Newly generated IV. So remember the output of teh Resultant encrypted string would be different each time even if teh Source string is Same. It uses teh Key that you set on Control Panel

Parameters:
$str string
$expiry int
Returns:
string

Definition at line 195 of file sec_func.php.

References perror().

00195                                   {
00196     global ${Z_IN_CRYPT_VAR_NAME};
00197     $crypt = &${Z_IN_CRYPT_VAR_NAME};
00198     if(!method_exists($crypt, 'denc')){
00199       perror('Sorry you must use either mcrypt or both xor and mcrypt as Encryption driver to use this function CURRENTLY');
00200       return false;
00201     }
00202     return $crypt->denc((string)$str, $key);
00203   }

Here is the call graph for this function:

zCrypt::ddcd ( str,
key = null 
)

Decrypts denc() encrypted string.

If verboae is turned on it fires error if the when the encrypted string has expired or the string is not properly encrypted

Parameters:
$encrypted_str string
$verbose bool
Returns:
string

Definition at line 212 of file sec_func.php.

References perror().

00212                                   {
00213     global ${Z_IN_CRYPT_VAR_NAME};
00214     $crypt = &${Z_IN_CRYPT_VAR_NAME};
00215     if(!method_exists($crypt, 'ddcd')){
00216       perror('Sorry you must use either mcrypt or both xor and mcrypt as Encryption driver to use this function CURRENTLY');
00217       return false;
00218     }
00219     return $crypt->ddcd($str, $key);
00220   }

Here is the call graph for this function:

zCrypt::mcrypt_aviliable (  ) 

Is mcrypt aviliable.

Returns:
bool;

Definition at line 226 of file sec_func.php.

00226                              {
00227     if(function_exists('mcrypt_module_open')){
00228       return true;
00229     }
00230     else return false;
00231   }

zCrypt::menc ( string,
key = null 
)

dynamically encrypts encrypts string using Mcrypt with Dynamically Generated IV.

Parameters:
$string string
$key string
Returns:
string

Definition at line 239 of file sec_func.php.

References $app_data, mcrypt_aviliable(), and perror().

00239                                     {
00240     global $app_data;
00241     if(!mcrypt_aviliable()){
00242       perror('Sorry Mcrypt is not aviliable');
00243       return false;
00244     }
00245     if($key == null){
00246       $data = parse_ini_file(ZIGROOT.DRS.Z_DIR_PROJECTS.DRS.Z_PROJECT_DIR.DRS.ZIGSETTINGSDIR.DRS.'mcpt.ini.php', false);
00247       $key = $data['mkey'];
00248     }
00249     srand((double) microtime() * 1000000);
00250     $key = md5($key);
00251     $key_size = mcrypt_get_key_size(SEC_MCRYPT_ALGO, SEC_MCRYPT_MODE);
00252     if(strlen($key) > $key_size){
00253       //perror("Length of the Key is too large for this algorighm<br />Supported Key size $key_size. Size of your key is ".strlen($key).". <br /> Either Select a Different Algorithm or select a Different key");
00254       $key = substr($key, 0, $key_size);
00255     }
00256     $td = mcrypt_module_open(SEC_MCRYPT_ALGO, '',SEC_MCRYPT_MODE, '');
00257     $key = substr($key, 0, mcrypt_enc_get_key_size($td));
00258     $iv_size = mcrypt_enc_get_iv_size($td);
00259     $iv = mcrypt_create_iv($iv_size, SEC_MCRYPT_IV_SRC);
00260     if(mcrypt_generic_init($td, $key, $iv) != -1){
00261       $c_t = mcrypt_generic($td, $string);
00262       mcrypt_generic_deinit($td);
00263       mcrypt_module_close($td);
00264       $c_t = $iv.$c_t;
00265       return $c_t;
00266     }
00267   }

Here is the call graph for this function:

zCrypt::mdcd ( string,
key = null 
)

Decryptor function of menc().

Parameters:
$encrypted_string string
$key string
Returns:
string

Definition at line 275 of file sec_func.php.

References mcrypt_aviliable(), and perror().

00275                                     {
00276     if(!mcrypt_aviliable()){
00277       perror('Sorry Mcrypt is not aviliable');
00278       return false;
00279     }
00280     if($key == null){
00281       $data = parse_ini_file(ZIGROOT.DRS.Z_DIR_PROJECTS.DRS.Z_PROJECT_DIR.DRS.ZIGSETTINGSDIR.DRS.'mcpt.ini.php', false);
00282       $key = $data['mkey'];
00283     }
00284     $key = md5($key);
00285     $key_size = mcrypt_get_key_size(SEC_MCRYPT_ALGO, SEC_MCRYPT_MODE);
00286     if(strlen($key) > $key_size){
00287       //perror("Length of the Key is too large for this algorighm<br />Supported Key size $key_size. Size of your key is ".strlen($key).". <br /> Either Select a Different Algorithm or select a Different key");
00288       $key = substr($key, 0, $key_size);
00289     }
00290     $td = mcrypt_module_open(SEC_MCRYPT_ALGO, '',SEC_MCRYPT_MODE, '');
00291     $key = substr($key, 0, mcrypt_enc_get_key_size($td));
00292     $iv_size = mcrypt_enc_get_iv_size($td);
00293     $iv = substr($string,0,$iv_size);
00294     $string = substr($string,$iv_size);
00295     if (mcrypt_generic_init($td, $key, $iv) != -1){
00296       $c_t = mdecrypt_generic($td, $string);
00297       mcrypt_generic_deinit($td);
00298       mcrypt_module_close($td);
00299       return $c_t;
00300     }
00301   }

Here is the call graph for this function:

zCrypt::tenc ( str,
key = null 
)

Encrypts Strings.

Such that an encrypted string is only valid for 1 second or 1 microsecond (as Customized in your Control Panel) If a Key is specified It Encrypts using that Key else Encrypts using teh key specified in Control Panel source gets encrypt with a Dynamic IV with Key = The Key Stored in Settings .(CONCAT) Curent Time (second / Microsecond)

Parameters:
$str string
$key string
Returns:
string

Definition at line 312 of file sec_func.php.

References perror().

00312                                   {
00313     global ${Z_IN_CRYPT_VAR_NAME};
00314     $crypt = &${Z_IN_CRYPT_VAR_NAME};
00315     if(!method_exists($crypt, 'tenc')){
00316       perror('Sorry you must use either mcrypt or both xor and mcrypt as Encryption driver to use this function CURRENTLY');
00317       return false;
00318     }
00319     return $crypt->tenc($str, $key);
00320   }

Here is the call graph for this function:

zCrypt::tdcd ( str,
key = null 
)

decryptor function of tenc().

Parameters:
$encrypted_string string
$key string
Returns:
string

Definition at line 328 of file sec_func.php.

References perror().

00328                                   {
00329     global ${Z_IN_CRYPT_VAR_NAME};
00330     $crypt = &${Z_IN_CRYPT_VAR_NAME};
00331     if(!method_exists($crypt, 'tenc')){
00332       perror('Sorry you must use either mcrypt or both xor and mcrypt as Encryption driver to use this function CURRENTLY');
00333       return false;
00334     }
00335     return $crypt->tdcd($str, $key);
00336   }

Here is the call graph for this function:


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

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