CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    string manipulation

    Does anyone understand what this means and can help me with a simple way to undo this in C? Any help would be greatly appreciated:
    Take a four byte constant and fold a string into it, byte by byte, by bitwise exclusive or (XOR). Each byte from the string is XORed with a byte in the constant, wrapping as necessary, until all bytes of the string are used up.
    I have both the end result of this process as well as the constant, I just need the string. Thanks!



  2. #2
    Join Date
    May 1999
    Posts
    318

    Re: string manipulation


    If i understand the formula is :


    for ( i=0; i<l; i++ )
    result(i)=string(i) ^ ct(i);




    so you have result and ct you want to find back string.

    If yes just make the reverse as this :


    for ( i=0; i<l; i++ )
    string(i)=result(i)^ct(i);







Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured