Borland C ++ Builder FAQ
The content The last update: 12/12/2008

What most simple data encryption algorithm?

The author: OlegGG
The initial link: - - -

The most simple encryption algorithm which I know is XOR.
Here ready function:
AnsiString XOR_Crypt (AnsiString in, AnsiString pass) 
{ 
AnsiString out; 
for (int x=1; x <in. Length () +1; x ++) 
        { 
        out + = (char) (in [x] ^ pass [x%pass. Length () +1]); 
        }
return out; 
}
For enciphering and decryption algorithm same.

Usage example:
Edit1-> Text = XOR_Crypt ("VVV\x0FRNTSBDR\x0FST", "!"); 
P.S. Who guesses, what appears in Edit1?