Php custom encryption and decryption program. Php custom encryption and decryption program PHP3Cryption is a very easy to crack, insecure encryption function, should not be a very important thing to use. Although the encryption is good, it will not hinder the php custom encryption and decryption program
PHP3 Cryption is a very easy-to-crack, insecure encryption function, and should not be a very important thing to use. Although encryption is good, it will not impede the rigorous test of the sophisticated cracking program.
But try it... this is a great way to encrypt and decrypt strings. It is bidirectional with many hidden nest functions. You can encrypt or decrypt a password. You can also decrypt or encrypt data multiple times through loops or other methods. The characters in the alphabet also change. All these things allow you to modify and consolidate encryption.
What is the best part? You can encrypt and decrypt a piece of paper and a pencil. This takes a long time, but you don't need a computer nearby to use it. if you have lost code, if you still remember that your technology can be decrypted.
I wrote these features in about an hour, after several unsuccessful and frustrating attempts, and gained a longer time I had no way out. The best way to achieve it that day after success is achieved.
Please note that this will not encrypt/decrypt intangible characters (spaces), such as line breaks (n) or tags (tons )! Sorry, but I tried. If you find a solution, please let me know!
*/
Highlight_file ("crypto. php Tutorial ");
$ Ralphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 !,. :;?~ @ # $ % ^ & * () _ +-=] [} {/> <"'";
$ Alphabet = $ ralphabet. $ ralphabet;
Class Crypto {
Function encrypt ($ password, $ strtoencrypt ){
Global $ ralphabet;
Global $ alphabet;
For ($ I = 0; $ I {
$ Cur_ps tutorial wd_ltr = substr ($ password, $ I, 1 );
$ Pos_alpha_ary [] = substr (strstr ($ alphabet, $ cur_pswd_ltr), 0, strlen ($ ralphabet ));
}
$ I = 0;
$ N = 0;
$ Nn = strlen ($ password );
$ C = strlen ($ strtoencrypt );
While ($ I <$ c)
{
$ Encrypted_string. = substr ($ pos_alpha_ary [$ n], strpos ($ ralphabet, substr ($ strtoencrypt, $ I, 1), 1 );
$ N ++;
If ($ n = $ nn) $ n = 0;
$ I ++;
}
Return $ encrypted_string;
}
Function decrypt ($ password, $ strtodecrypt ){
Global $ ralphabet;
Global $ alphabet;
For ($ I = 0; $ I {
$ Cur_pswd_ltr = substr ($ password, $ I, 1 );
$ Pos_alpha_ary [] = substr (strstr ($ alphabet, $ cur_pswd_ltr), 0, strlen ($ ralphabet ));
}
$ I = 0;
$ N = 0;
$ Nn = strlen ($ password );
$ C = strlen ($ strtodecrypt );
While ($ I <$ c)
{
$ Decrypted_string. = substr ($ ralphabet, strpos ($ pos_alpha_ary [$ n], substr ($ strtodecrypt, $ I, 1), 1 );
$ N ++;
If ($ n = $ nn) $ n = 0;
$ I ++;
}
Return $ decrypted_string;
}
Function cryption_table ($ password ){
Global $ ralphabet;
Global $ alphabet;
For ($ I = 0; $ I {
$ Cur_pswd_ltr = substr ($ password, $ I, 1 );
$ Pos_alpha_ary [] = substr (strstr ($ alphabet, $ cur_pswd_ltr), 0, strlen ($ ralphabet ));
}
Print"
Print"
For ($ I = 0; $ I {
Print"
Print"
N ";
| ";For ($ j = 0; $ j{Print"
". Substr ($ ralphabet, $ j, 1 )." | N ";}Print"
";
| ". ($ I + 1)." | | ";For ($ k = 0; $ k{Print"
". Substr ($ pos_alpha_ary [$ I], $ k, 1 )." | N ";}Print"
";}
N ";
}
} // End class Crypto
// Example written by Macro Zeng
// The motto of the network technology supervisor: the trio must have our teacher. Http://www.bkjia.com
$ Ct = new Crypto;
// $ Ct-> cryption_table ($ password );
Echo "";
PHP3 Cryption is a very easy-to-crack, insecure encryption function, and should not be a very important thing to use. Although the encryption is good, it will not hinder...