[Overview][Constants][Types][Procedures and functions] |
Encode a string by XOR-ing its characters using characters of a given key.
Source position: strutils.pp line 159
function XorString( |
const Key: ShortString; |
const Src: ShortString |
):ShortString; |
Key |
|
Key to use |
Src |
|
String to encode. |
Resulting string
XorStringencodes the string Srcby XOR-ing each character in Sourcewith the corresponding character in Key, repeating Keyas often as necessary. The resulting string may contain unreadable characters and may even contain null characters. For this reason it may be a better idea to use the XorEncodefunction instead, which will representing each resulting ASCII code as a hexadecimal number (of length 2).
Feeding the result again to XorStringwith the same Key, will result in the original string Src.
None.
|
Encode a string by XOR-ing its characters using characters of a given key, representing the result as hex values. |
|
|
Decode a string encoded with XorEncode |