function encrypt_decrypt($Str_Message) {
$Len_Str_Message = strlen($Str_Message);
$Str_Encrypted_Message="";
for ($Position = 0; $Position<$Len_Str_Message; $Position++){
$Key_To_Use = (($Len_Str_Message+$Position)+1);
$Key_To_Use = (255+$Key_To_Use) % 255;
$Byte_To_Be_Encrypted = SUBSTR($Str_Message, $Position, 1);
$Ascii_Num_Byte_To_Encrypt = ord($Byte_To_Be_Encrypted);
$Xored_Byte = $Ascii_Num_Byte_To_Encrypt ^ $Key_To_Use;
$Encrypted_Byte = chr($Xored_Byte);
$Str_Encrypted_Message .= $Encrypted_Byte;
}
return $Str_Encrypted_Message;
}
function encrypt_decrypt($Str_Message) {
$Len_Str_Message = strlen($Str_Message); $Str_Encrypted_Message="";
for ($Position = 0; $Position<$Len_Str_Message; $Position++){
$Key_To_Use = (($Len_Str_Message+$Position)+1);
$Key_To_Use = (255+$Key_To_Use) % 255;
$Byte_To_Be_Encrypted = SUBSTR($Str_Message, $Position, 1); $Ascii_Num_Byte_To_Encrypt = ord($Byte_To_Be_Encrypted); $Xored_Byte = $Ascii_Num_Byte_To_Encrypt ^ $Key_To_Use;
$Encrypted_Byte = chr($Xored_Byte); $Str_Encrypted_Message .= $Encrypted_Byte;
}
return $Str_Encrypted_Message;
}