How to access the stored credentials (PasswordVault?) on Win7 and Win8?

后端 未结 3 2004
[愿得一人]
[愿得一人] 2020-12-01 19:20

I just discovered that Win8 has a section on the Control Panel called User Accounts and Family Safely with Credential Manager. I\'d like to access the cred

3条回答
  •  Happy的楠姐
    2020-12-01 19:34

    You can use wrapped Credential Management package. It's an open-source project. I checked it in Windows 7 and it works right.

    In order to save your data use following code:

        Credential saved = new Credential("username", "password", "MyApp", CredentialType.Generic);
        saved.PersistanceType = PersistanceType.LocalComputer;
        saved.Save();
    

    And to load your data use:

        Credential credential = new Credential { Target = "MyApp", Type = CredentialType.Generic };
        credential.Load();
    

提交回复
热议问题