summaryrefslogtreecommitdiff
path: root/keystore/java/android/security/KeyStoreKeySpec.java
diff options
context:
space:
mode:
authorAlex Klyubin <klyubin@google.com>2015-05-11 19:43:45 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-11 19:43:46 +0000
commit09b15d5bdb2eebc5e63889297789c15e97fa24b5 (patch)
treec12444bf8fb351147c71b00a4004b13195f7b868 /keystore/java/android/security/KeyStoreKeySpec.java
parent5fccffd573395bbd21c477f064de7c25100c3f8a (diff)
parent54bb1596e470144932943046ec7a99551d020ba0 (diff)
Merge "Add NonNull and Nullable annotations to AndroidKeyStore API." into mnc-dev
Diffstat (limited to 'keystore/java/android/security/KeyStoreKeySpec.java')
-rw-r--r--keystore/java/android/security/KeyStoreKeySpec.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/keystore/java/android/security/KeyStoreKeySpec.java b/keystore/java/android/security/KeyStoreKeySpec.java
index 0a9acbb43698..81a19bb55755 100644
--- a/keystore/java/android/security/KeyStoreKeySpec.java
+++ b/keystore/java/android/security/KeyStoreKeySpec.java
@@ -16,6 +16,9 @@
package android.security;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+
import java.security.PrivateKey;
import java.security.spec.KeySpec;
import java.util.Date;
@@ -150,6 +153,7 @@ public class KeyStoreKeySpec implements KeySpec {
*
* @return instant or {@code null} if not restricted.
*/
+ @Nullable
public Date getKeyValidityStart() {
return mKeyValidityStart;
}
@@ -159,6 +163,7 @@ public class KeyStoreKeySpec implements KeySpec {
*
* @return instant or {@code null} if not restricted.
*/
+ @Nullable
public Date getKeyValidityForConsumptionEnd() {
return mKeyValidityForConsumptionEnd;
}
@@ -168,6 +173,7 @@ public class KeyStoreKeySpec implements KeySpec {
*
* @return instant or {@code null} if not restricted.
*/
+ @Nullable
public Date getKeyValidityForOriginationEnd() {
return mKeyValidityForOriginationEnd;
}
@@ -182,6 +188,7 @@ public class KeyStoreKeySpec implements KeySpec {
/**
* Gets the set of block modes with which the key can be used.
*/
+ @NonNull
public @KeyStoreKeyProperties.BlockModeEnum String[] getBlockModes() {
return ArrayUtils.cloneIfNotEmpty(mBlockModes);
}
@@ -189,6 +196,7 @@ public class KeyStoreKeySpec implements KeySpec {
/**
* Gets the set of padding modes with which the key can be used when encrypting/decrypting.
*/
+ @NonNull
public @KeyStoreKeyProperties.EncryptionPaddingEnum String[] getEncryptionPaddings() {
return ArrayUtils.cloneIfNotEmpty(mEncryptionPaddings);
}
@@ -196,6 +204,7 @@ public class KeyStoreKeySpec implements KeySpec {
/**
* Gets the set of padding modes with which the key can be used when signing/verifying.
*/
+ @NonNull
public @KeyStoreKeyProperties.SignaturePaddingEnum String[] getSignaturePaddings() {
return ArrayUtils.cloneIfNotEmpty(mSignaturePaddings);
}
@@ -203,6 +212,7 @@ public class KeyStoreKeySpec implements KeySpec {
/**
* Gets the set of digest algorithms with which the key can be used.
*/
+ @NonNull
public @KeyStoreKeyProperties.DigestEnum String[] getDigests() {
return ArrayUtils.cloneIfNotEmpty(mDigests);
}