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

Thread: app.config Q?

  1. #1
    Join Date
    Dec 2009
    Posts
    18

    app.config Q?

    I have an app were I have placed a key inside the app.config file used to hash some data.
    So in my debug dir I have my app and the app.config file.

    Without the config I get an error the key is missing of course.

    So my question is, is there any way of including this within my app so a user couldn't just pop open the xml file and read the key?

  2. #2
    Join Date
    Mar 2004
    Location
    Prague, Czech Republic, EU
    Posts
    1,701

    Re: app.config Q?

    You can define it somewhere as constant or readonly field, but this still will be discoverable by tools like refelector, event with a little bit effort. If you want more secure storage, encrypt the key with DPAPI and store it in the config. Disadvantage of this approach is, that the key is untransferable to other machine or under other user profile.
    • Make it run.
    • Make it right.
    • Make it fast.

    Don't hesitate to rate my post.

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