How to store passwords in Winforms application?

前端 未结 4 982
梦如初夏
梦如初夏 2020-11-30 22:44

I have some code like this in a winforms app I was writing to query a user\'s mail box Storage Quota.

DirectoryEntry mbstore = new DirectoryEntry(
      @\"L         


        
4条回答
  •  借酒劲吻你
    2020-11-30 22:58

    As mentioned, the Data Protection API is a good way to do this. Note that if you're using .NET 2.0 or greater, you don't need to use P/Invoke to invoke the DPAPI. The framework wraps the calls with the System.Security.Cryptography.ProtectedData class.

提交回复
热议问题