1

Windows (Phone) 8.1 has a Credential Locker called PasswordVault that you can use to store and encrypt credentials.

I saw from this question you are able to access or get the credentials via the Reference Manager on Windows 8. So, I am looking for something similar, but on the Windows Phone (8.1).

Question: How do you verify that the credentials inside the PaswordVault on the Windows Phone are actually encrypted?

Purpose: I don't like to take things on face value, I want to verify that the credentials are really encrypted.

Community
  • 1
  • 1
Barnstokkr
  • 2,904
  • 1
  • 19
  • 34

1 Answers1

0

Password vault is dedicated space for your credentials and it cannot be accesed from any other application.

There is code for storing credentials:

var vault = new Windows.Security.Credentials.PasswordVault();
        vault.Add(new Windows.Security.Credentials.PasswordCredential("Your_App_Name", userName, password));

Here is method for retreiving credentials:

public static Windows.Security.Credentials.PasswordCredential GetCredentialFromLocker()
    {
        try
        {
            Windows.Security.Credentials.PasswordCredential credential = null;
            var vault = new Windows.Security.Credentials.PasswordVault();
            var credentialList = vault.FindAllByResource("Your_App_Name");

            if (credentialList.Count > 0)
            {
                if (credentialList.Count == 1)
                {
                    credential = credentialList[0];
                }
            }

            return credential;
        }

        catch (Exception e)
        {
            return null;
        }
    }

Hope it will help.

Daniel Krzyczkowski
  • 2,732
  • 2
  • 20
  • 30
  • I can already store and retrieve credentials using the `PasswordVault` this is however not the question. The question is how do you verify that those passwords inside the `PasswordVault` actuality are encrypted! – Barnstokkr Feb 02 '15 at 06:07