diff options
author | Alex Klyubin <klyubin@google.com> | 2015-06-16 10:44:11 -0700 |
---|---|---|
committer | Alex Klyubin <klyubin@google.com> | 2015-06-17 11:08:29 -0700 |
commit | 83cc7a347f4775821ebeed04a2244b8b847be516 (patch) | |
tree | eb679ee090881d363c901bf4e14a3b280dbd1612 /keystore/java/android/security/keystore/KeyInfo.java | |
parent | e826515469274b4675a5ae6948dd04855ff0b786 (diff) | |
download | frameworks_base-83cc7a347f4775821ebeed04a2244b8b847be516.zip frameworks_base-83cc7a347f4775821ebeed04a2244b8b847be516.tar.gz frameworks_base-83cc7a347f4775821ebeed04a2244b8b847be516.tar.bz2 |
Improve documentation for keys requiring user auth.
Bug: 18088752
Change-Id: I24eeb33790a74d8d81d10fcdb1eb058d47144c44
Diffstat (limited to 'keystore/java/android/security/keystore/KeyInfo.java')
-rw-r--r-- | keystore/java/android/security/keystore/KeyInfo.java | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/keystore/java/android/security/keystore/KeyInfo.java b/keystore/java/android/security/keystore/KeyInfo.java index 03b4100..91a9a70 100644 --- a/keystore/java/android/security/keystore/KeyInfo.java +++ b/keystore/java/android/security/keystore/KeyInfo.java @@ -238,17 +238,27 @@ public class KeyInfo implements KeySpec { } /** - * Returns {@code true} if user authentication is required for this key to be used. + * Returns {@code true} if the key is authorized to be used only if the user has been + * authenticated. + * + * <p>This authorization applies only to secret key and private key operations. Public key + * operations are not restricted. * * @see #getUserAuthenticationValidityDurationSeconds() + * @see KeyGenParameterSpec.Builder#setUserAuthenticationRequired(boolean) + * @see KeyProtection.Builder#setUserAuthenticationRequired(boolean) */ public boolean isUserAuthenticationRequired() { return mUserAuthenticationRequired; } /** - * Gets the duration of time (seconds) for which this key can be used after the user is - * successfully authenticated. This has effect only if user authentication is required. + * Gets the duration of time (seconds) for which this key is authorized to be used after the + * user is successfully authenticated. This has effect only if user authentication is required + * (see {@link #isUserAuthenticationRequired()}). + * + * <p>This authorization applies only to secret key and private key operations. Public key + * operations are not restricted. * * @return duration in seconds or {@code -1} if authentication is required for every use of the * key. |