Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

In WinRT API there is Windows.Security.Credentials namespace which contains the PasswordCredential class. Using it we can encrypt sensitive data like user names and passwords but the class itself has a property named "Properties" which looks to me like a handy container for other custom properties somehow related to the stored credential but I can't get it to work. There is a "Read-only" access type for the "Properties" in the documentation but I thought that meant only that I can't change the reference to the container it points to. My question is:

Is the "Properties" property of PasswordCredential useable for programmers?

Sorry for any errors in text, you can also correct my english in the answers, it is not my native language ;)

EDIT: This may be useful:

The "Add" method in the following code throws ArgumentException:

PasswordVault v = new PasswordVault();
PasswordCredential c = new PasswordCredential("TEST", "TEST", "TEST");
c.Properties.Add("Name", "testName");
v.Add(c);
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
738 views
Welcome To Ask or Share your Answers For Others

1 Answer

Unfortunately, the PasswordCredentials.Properties is an instance of PasswordCredentialPropertyStore which documentation describes every method as "...reserved for internal use and not intended to be used in your code".

That's why it is not useable for programmers.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...