mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-23 13:11:28 +00:00
added "delete passphrase" method to keychain access
This commit is contained in:
@@ -16,4 +16,11 @@ public interface KeychainAccess {
|
||||
*/
|
||||
CharSequence loadPassphrase(String key);
|
||||
|
||||
/**
|
||||
* Deletes a passphrase with a given key.
|
||||
*
|
||||
* @param key Unique key previously used while {@link #storePassphrase(String, CharSequence) storing a passphrase}.
|
||||
*/
|
||||
void deletePassphrase(String key);
|
||||
|
||||
}
|
||||
|
||||
@@ -38,4 +38,9 @@ class MacSystemKeychainAccess implements KeychainAccessStrategy {
|
||||
return SystemUtils.IS_OS_MAC_OSX && keychain != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletePassphrase(String key) {
|
||||
keychain.deletePassword(key);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -37,6 +37,12 @@ class WindowsSystemKeychainAccess implements KeychainAccessStrategy {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletePassphrase(String key) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSupported() {
|
||||
return SystemUtils.IS_OS_WINDOWS && keyStore != null;
|
||||
|
||||
@@ -17,6 +17,12 @@ class MapKeychainAccess implements KeychainAccessStrategy {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletePassphrase(String key) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSupported() {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user