Tech Off Thread

3 posts

Account specific magic cookie?

Back to Forum: Tech Off
  • User profile image
    TomasDeml

    Hi,
    does anybody know if there is something like a magic cookie that is specific to each user account under Windows and IS accessible ONLY when the account is logged in and CAN be retrieved via some API?

    I'd like to use some sort of the cookie only accessible to an authenticated user for a password encryption...

    Thanks.

  • User profile image
    Sven Groot

    If it's for password encryption, have you considered using DPAPI? That can encrypt data so that only that user can decrypt it (available in Win2k+ only, though).

    If you're using .Net, .Net 2.0 has built-in DPAPI support with the ProtectedData class. If you're using .Net 1.1 Google around a bit, there's a ton of DPAPI wrappers available.

  • User profile image
    TomasDeml

    Sven Groot wrote:
    If it's for password encryption, have you considered using DPAPI? That can encrypt data so that only that user can decrypt it (available in Win2k+ only, though).

    If you're using .Net, .Net 2.0 has built-in DPAPI support with the ProtectedData class. If you're using .Net 1.1 Google around a bit, there's a ton of DPAPI wrappers available.


    Thanks a lot! You saved me a day Wink

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.