lsflib/src/xor.c
changeset 6 c3dc3eb3b541
child 9 c3fecc82ade6
equal deleted inserted replaced
5:d752cbe8208e 6:c3dc3eb3b541
       
     1 /*
       
     2  *  $Id: xor.c 94 2008-04-05 01:27:30Z mbroeker $
       
     3  * $URL: http://localhost/svn/c/lsflib/trunk/src/xor.c $
       
     4  *
       
     5  */
       
     6 
       
     7 #include <string.h>
       
     8 
       
     9 char *xor (char *s, char key)
       
    10 {
       
    11     int i;
       
    12 
       
    13     for (i = 0; i < strlen (s); i++)
       
    14         s[i] ^= key;
       
    15 
       
    16     return s;
       
    17 }