Add HmacSHA256 backed by AndroidKeyStore.
This also adds the MAC length constraint on imported HMAC keys. HMAC doesn't work without this constraint at the moment. Bug: 18088752 Change-Id: I8613f58f5d2a84df00bcf6179d13e30619440330
This commit is contained in:
@@ -39,5 +39,9 @@ public class AndroidKeyStoreProvider extends Provider {
|
||||
// javax.crypto.KeyGenerator
|
||||
put("KeyGenerator.AES", KeyStoreKeyGeneratorSpi.AES.class.getName());
|
||||
put("KeyGenerator.HmacSHA256", KeyStoreKeyGeneratorSpi.HmacSHA256.class.getName());
|
||||
|
||||
// javax.crypto.Mac
|
||||
put("Mac.HmacSHA256", KeyStoreHmacSpi.HmacSHA256.class.getName());
|
||||
put("Mac.HmacSHA256 SupportedKeyClasses", KeyStoreSecretKey.class.getName());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user