|
@@ -49,6 +49,12 @@ public class KeychainManager implements KeychainAccessProvider {
|
|
|
setPassphraseStored(key, true);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void storePassphrase(String key, String displayName, CharSequence passphrase) throws KeychainAccessException {
|
|
|
+ getKeychainOrFail().storePassphrase(key, displayName, passphrase);
|
|
|
+ setPassphraseStored(key, true);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public char[] loadPassphrase(String key) throws KeychainAccessException {
|
|
|
char[] passphrase = getKeychainOrFail().loadPassphrase(key);
|
|
@@ -70,6 +76,14 @@ public class KeychainManager implements KeychainAccessProvider {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void changePassphrase(String key, String displayName, CharSequence passphrase) throws KeychainAccessException {
|
|
|
+ if (isPassphraseStored(key)) {
|
|
|
+ getKeychainOrFail().changePassphrase(key, displayName, passphrase);
|
|
|
+ setPassphraseStored(key, true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public boolean isSupported() {
|
|
|
return keychain.getValue() != null;
|