
Let’s start with the actual PHP function: 1. function XOREncryption($InputString, $KeyPhrase){ 2. 3. $KeyPhraseLength = strlen($KeyPhrase); 4. 5. // Loop trough input string 6. for ($i = 0; $i //SALT $salt = ‘my_special_phrase’; //ENCRYPT $crypted = base64_encode(XOREncryption(‘my string’, $salt)); echo “Encrypted: ” . $crypted . ““; The variable ‘ $salt ‘ plays a crucial role here. It is essentially the ‘key’ to your encrypted string. The […]