summaryrefslogtreecommitdiffstats
path: root/keystore/java/android/security/keystore/KeyInfo.java
diff options
context:
space:
mode:
authorAlex Klyubin <klyubin@google.com>2015-06-16 10:44:11 -0700
committerAlex Klyubin <klyubin@google.com>2015-06-17 11:08:29 -0700
commit83cc7a347f4775821ebeed04a2244b8b847be516 (patch)
treeeb679ee090881d363c901bf4e14a3b280dbd1612 /keystore/java/android/security/keystore/KeyInfo.java
parente826515469274b4675a5ae6948dd04855ff0b786 (diff)
downloadframeworks_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.java16
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.