gpt4 book ai didi

winrt-xaml - PasswordCredentials.Password 在 PasswordVault 中始终为空

转载 作者:行者123 更新时间:2023-12-04 06:49:49 25 4
gpt4 key购买 nike

我正在尝试使用以下代码在 Windows Phone 8.1 PasswordVault 中存储用户名密码,它存储数据但是当我检索密码字段时始终为空。

  PasswordVault passwordVault = new PasswordVault();
passwordVault.Add(new PasswordCredential("MyResouceKey", "username", "Password"));

// Retrieval
var credential = passwordVault.FindAllByResource("MyResourceKey");
return credential.Password; /// it is always empty.

密码永远为空

最佳答案

在获取 Password 属性之前,您需要调用 credential.RetrievePassword()

http://msdn.microsoft.com/en-us/library/windows/apps/windows.security.credentials.passwordcredential.retrievepassword

关于winrt-xaml - PasswordCredentials.Password 在 PasswordVault 中始终为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26885156/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com