Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Clipper Tools One Guide - <b>charxor()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
CHARXOR()

Syntax:     CHARXOR([@]<expC1>,<expC2>)

Arguments:  <expC1> is the string to be linked by exclusive OR.
            <expC2> contains the character used to link the characters
            in <expC1> by exclusive OR.

Returns:    A character string.
            The processed <expC1> string.

Usage:      The function will link (join each bit by EXCLUSIVE OR) each
            character in <expC1> with the corresponding character in the
            <expC2> string.  It is possible to use CHARXOR() for coding
            passwords and texts.  The advantage of this function is that
            it can be used for encoding and decoding.

Notes:      If the two strings are the same length, then the first byte of
            <expC1> will be joined to the first byte of <expC2>, the
            second byte of <expC1> to the second  byte of <expC2>,
            etc.  If the <expC2> argument is shorter than <expC1>, then
            on reaching the last byte of <expC2> the continuation will
            start again with the first byte of <expC2>.  However, if
            <expC1> is shorter than <expC2> the process will stop at
            the end of <expC1>.

Library:    CT1.LIB


--------------------------------- Example ------------------------------

Examples:   * CHARXOR() once will return the coded value.
            * A password this short should not be chosen.
            ? CHARXOR("Secret","Password")

            * Running CHARXOR() twice will return the
            * initial value again.
            ? CHARXOR(CHARXOR("Secret","Password"),"Password")
                                                        && "Secret"

            * A double coding is also possible.
            ? CHARXOR(CHARXOR("Secret","Password"),"A12B44")




See Also: CHARAND() CHARNOT() CHAROR()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson