After base64 encryption, the entire program is very simple. {code is decrypted {code...} and {code...} is encrypted in different or string encryption mode. complete code example: {code ~ It should be difficult to crack according to logic thinking. if others do not know your key, if they still feel insecure. So after I encrypt... base64, the difference or string encryption method
Encryption
function encode($str,$key){ $res = base64_encode($str); $code = $res^$key; return $code;}
Decryption
function decode($str,$key){ return base64_decode($str^$key);}
Complete Code example:
$str = '111021';$key = 'APPYJJ-PHONE-LAZY';function encode($str,$key){ $res = base64_encode($str); $code = $res^$key; return $code;}$str = encode($str,$key);print_r($str);echo "";function decode($str,$key){ return base64_decode($str^$key);}print_r(decode($str,$key));
-
The whole program is very simple ~ It should be difficult to crack according to logic thinking. when others do not know your key;
-
If you still feel insecure. So I will discuss it here. we suggest you continue to use the shift operation during encryption and decryption.
// During encryption; $ a = $ str> 4; // The opposite is true for decryption. $ a = $ str <4;
OK !~ Till now, the blogger has continued to work !~~
Base64-based unique or string encryption
Encryption
function encode($str,$key){ $res = base64_encode($str); $code = $res^$key; return $code;}
Decryption
function decode($str,$key){ return base64_decode($str^$key);}
Complete Code example:
$str = '111021';$key = 'APPYJJ-PHONE-LAZY';function encode($str,$key){ $res = base64_encode($str); $code = $res^$key; return $code;}$str = encode($str,$key);print_r($str);echo "";function decode($str,$key){ return base64_decode($str^$key);}print_r(decode($str,$key));
-
The whole program is very simple ~ It should be difficult to crack according to logic thinking. when others do not know your key;
-
If you still feel insecure. So I will discuss it here. we suggest you continue to use the shift operation during encryption and decryption.
// During encryption; $ a = $ str> 4; // The opposite is true for decryption. $ a = $ str <4;
For more information about a newly written PHP encryption/decryption function, please refer to the PHP Chinese website!