Base64 encryption of different or string encryption methods
Encryption
function encode ($str, $key) { $res = Base64_encode ($STR); $code = $res ^ $key; return $code;}
Decrypt
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);p Rint_r ($STR), echo "
The whole procedure is very simple ~ according to logical thinking should be difficult to crack, in the case of others do not know your secret key;
If it doesn't feel safe. So I'm going to make a point here; we recommend that you continue to use the shift operation during the encryption and decryption process.
When encrypting, $a = $str >> 4;//decryption is the opposite of $ A = $str << 4;
Ok!~, the blogger continues to work! ~~
Base64 encryption of different or string encryption methods
Encryption
function encode ($str, $key) { $res = Base64_encode ($STR); $code = $res ^ $key; return $code;}
Decrypt
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);p Rint_r ($STR), echo "
The whole procedure is very simple ~ according to logical thinking should be difficult to crack, in the case of others do not know your secret key;
If it doesn't feel safe. So I'm going to make a point here; we recommend that you continue to use the shift operation during the encryption and decryption process.
When encrypting, $a = $str >> 4;//decryption is the opposite of $ A = $str << 4;