Open gzep opened 2 years ago
The sample app doesn't provide the best example but here is what I've used. The main branch has a bug with not encoding properly. The pull request (PR), #37, fixes UTF-16LE instead of UTF-8 encoding. I applied the PR manually and it worked.
final SecretStore<Credential> credStore = StorageProvider.getCredentialStorage(true, SecureOption.PREFER);
//Add to MS Credential Manager
String sName = "TestSubject01";
String sPass = "thiswasatriumph";
String sAddress = "GlaDOS";
Credential cred = new Credential(sName, sPass);
credStore.add(sAddress, cred);
System.out.println(credStore.get(sAddress).Username + " : " + credStore.get(sAddress).Password);
Thanks for lettin' me know. I subscribed for the pull request and give feedback later.
Hello,
can you please provide a short code snippet or description how to fetch credentials from CredManagerBackedCredentialStore? When I call get() with a name that is displayed in the credential manager it gives me com.sun.jna.LastErrorException: [1168] Element not found.
Thank you very much!