summaryrefslogtreecommitdiff
path: root/keystore/java/android/security/KeyStoreKeyConstraints.java
diff options
context:
space:
mode:
authorAlex Klyubin <klyubin@google.com>2015-04-09 09:28:38 -0700
committerAlex Klyubin <klyubin@google.com>2015-04-09 10:10:34 -0700
commit5324702a02660d75a9dfb231daeb0c3ede75c499 (patch)
tree83fafd77b46f64241d0e754d46b0a577bcb43e98 /keystore/java/android/security/KeyStoreKeyConstraints.java
parenta482b0469cb98a5743603e1602aa6f37c65d1659 (diff)
Add missing mapping between JCA and keystore HMAC names.
This is a follow-up to 70376a77280551791dae62586a6bb0c77ed9429a where I forgot to update this mapping. Bug: 18088752 Change-Id: I322a9abd642ddee3bd2b4f49379b121012e32836
Diffstat (limited to 'keystore/java/android/security/KeyStoreKeyConstraints.java')
-rw-r--r--keystore/java/android/security/KeyStoreKeyConstraints.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/keystore/java/android/security/KeyStoreKeyConstraints.java b/keystore/java/android/security/KeyStoreKeyConstraints.java
index 7f691fb0c606..02108fd7b10a 100644
--- a/keystore/java/android/security/KeyStoreKeyConstraints.java
+++ b/keystore/java/android/security/KeyStoreKeyConstraints.java
@@ -213,8 +213,18 @@ public abstract class KeyStoreKeyConstraints {
throw new IllegalArgumentException("HMAC digest not specified");
}
switch (digest) {
+ case Digest.MD5:
+ return "HmacMD5";
+ case Digest.SHA1:
+ return "HmacSHA1";
+ case Digest.SHA224:
+ return "HmacSHA224";
case Digest.SHA256:
return "HmacSHA256";
+ case Digest.SHA384:
+ return "HmacSHA384";
+ case Digest.SHA512:
+ return "HmacSHA512";
default:
throw new IllegalArgumentException(
"Unsupported HMAC digest: " + digest);