Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>charxor()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 CHARXOR()
 Joins corresponding ASCII codes of paired strings using an exclusive OR
 operation
------------------------------------------------------------------------------
 Syntax

     CHARXOR(<cString1>,<cString2>) --> cString

 Arguments

     <cString1>  [@]  Designates the character string on which the
     exclusive OR (XOR) operation is performed.

     <cString2>  Designates the characters that are joined using XOR with
     <cString1>.

 Returns

     The processed <cString1> is returned.

 Description

     The function performs an exclusive OR operation on each character in
     <cString1> with the corresponding characters in <cString2>.

     You can use CHARXOR() to code passwords and text.  The advantage of this
     function is that it can be used for both encryption and decryption.

 Notes

     .  If both character strings are the same length, then the first
        byte of <cString1> is linked with the first byte of <cString2>, and
        the second byte of <cString1> is linked with the second byte of
        <cString2>, etc..  If <cString2> is shorter than <cString1>, then
        when the last byte of <cString2> is reached, it continues with the
        first byte of <cString2>.  However, if <cString1> is shorter than
        <cString2>, the process terminates at the end of <cString1>.

     .  The return value of this function can be suppressed by
        implementing CSETREF() to save room in working memory.

 Examples

     .  CHARXOR() returns the coded value once.  The password should
        be as long as possible:

        ? CHARXOR("Secret", "Password")

     .  Call CHARXOR() twice to return the initial value:

        ? CHARXOR(CHARXOR("Secret", "Password"), "Password")

     .  A double encryption is also possible:

        ? CHARXOR(CHARXOR("Secret", "Password"), "A12B44")


See Also: CRYPT() CHARAND() CHAROR() CHARNOT() CSETREF() Introduction

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