The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Class: none
Declaration: function Scramble (Instring: string): string;

The function Scramble exchanges the characters of the string Instring by a set of characters which has been defined with the procedure InitScramble. This function may be used to hide information from users. A scrambled string may be unscrambled by the function Descramble.

Hint 1: Scramble is not an encryption routine, it solely exchanges characters of a string. You should therefore be careful not to rely on this function for "encrypting" sensitive information.

Hint 2: The lookup table for the character exchange is uniquely defined by the key of the procedure InitScramble.

Hint 3: The exchange algorithm uses all 256 ANSI codes to scramble a string. The result will therefore most likely be unreadable.

Last Update: 2012-Oct-20