CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 1999
    Posts
    7

    Hiding Text in .EXE?

    I'm writing a program that includes sensitive information (for example a password for that program) in the executable. If I do something like
    char *szString = "secret string"; then I can easily find and edit that string using a Hex Editor. How can I reliably encrypt or somehow hide this string from showing up in the executable? I want to re-assemble the real string during runtime.

    ---
    Jawed Karim

  2. #2
    Guest

    Re: Hiding Text in .EXE?

    Do you want the good news or the bad???

    It is easy to hide strings by just XORing each character with a known character or rotation of characters. The bad news is that anybody with a debugger will be able to get your string values at runtime with no problem.

    What are you trying to do, store passwords? If so try storing the results of a unidirectional hash of the password. These one way functions can not be used to reproduce the original password and can be stored safely.


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