11package org .cryptomator .integrations .keychain ;
22
33import org .cryptomator .integrations .common .IntegrationsLoader ;
4+ import org .jetbrains .annotations .ApiStatus ;
5+ import org .jetbrains .annotations .Blocking ;
6+ import org .jetbrains .annotations .Nls ;
47
58import java .util .stream .Stream ;
69
@@ -24,6 +27,7 @@ static Stream<KeychainAccessProvider> get() {
2427 *
2528 * @return user-friendly name (must not be null or empty)
2629 */
30+ @ Nls (capitalization = Nls .Capitalization .Title )
2731 String displayName ();
2832
2933 /**
@@ -35,6 +39,7 @@ static Stream<KeychainAccessProvider> get() {
3539 * @deprecated Please use {@link #storePassphrase(String, String, CharSequence)} instead
3640 */
3741 @ Deprecated
42+ @ ApiStatus .ScheduledForRemoval (inVersion = "1.2.0" )
3843 void storePassphrase (String key , CharSequence passphrase ) throws KeychainAccessException ;
3944
4045 /**
@@ -47,6 +52,7 @@ static Stream<KeychainAccessProvider> get() {
4752 * @param passphrase The secret to store in this keychain.
4853 * @throws KeychainAccessException If storing the password failed
4954 */
55+ @ Blocking
5056 default void storePassphrase (String key , String displayName , CharSequence passphrase ) throws KeychainAccessException {
5157 storePassphrase (key , passphrase );
5258 }
@@ -56,6 +62,7 @@ default void storePassphrase(String key, String displayName, CharSequence passph
5662 * @return The stored passphrase for the given key or <code>null</code> if no value for the given key could be found.
5763 * @throws KeychainAccessException If loading the password failed
5864 */
65+ @ Blocking
5966 char [] loadPassphrase (String key ) throws KeychainAccessException ;
6067
6168 /**
@@ -75,6 +82,7 @@ default void storePassphrase(String key, String displayName, CharSequence passph
7582 * @deprecated Please use {@link #changePassphrase(String, String, CharSequence)} instead
7683 */
7784 @ Deprecated
85+ @ ApiStatus .ScheduledForRemoval (inVersion = "1.2.0" )
7886 void changePassphrase (String key , CharSequence passphrase ) throws KeychainAccessException ;
7987
8088 /**
@@ -87,6 +95,7 @@ default void storePassphrase(String key, String displayName, CharSequence passph
8795 * @param passphrase The secret to be updated in this keychain.
8896 * @throws KeychainAccessException If changing the password failed
8997 */
98+ @ Blocking
9099 default void changePassphrase (String key , String displayName , CharSequence passphrase ) throws KeychainAccessException {
91100 changePassphrase (key , passphrase );
92101 }
0 commit comments