$WBSXOR - simple XOR encryption/decryption

$WBSXOR is available for use with all WBSP commands.


key - the string containing encryption key
data - the string to be encrypted or decrypted 

The XOR encrypted or decrypted string. XOR Encryption is the simplest stream cipher also called the Vernam cipher. The function XORs every data character with appropriate character of the key. The process is exactly same for encryption as well as decryption. With short keys Vernam or XOR Ciphers turn out to be easy to break. Still it is often used by some service providers to encrypt form data sent from web page.


Encrypted text: $WBSETV[enctext|$WBSXOR[myshortkey|This is plain, clear text]|T]<br>
Decrypted text: $WBSXOR[myshortkey|$WBGETV[enctext]]

After running this example, the resulting page in browser should look like this:

Encrypted text: 9O K DO M 
Decrypted text: This is plain, clear text