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:
@@ -13,9 +13,11 @@ public abstract class KeymasterUtils {
|
||||
case KeymasterDefs.KM_ERROR_INVALID_AUTHORIZATION_TIMEOUT:
|
||||
// The name of this parameter significantly differs between Keymaster and framework
|
||||
// APIs. Use the framework wording to make life easier for developers.
|
||||
return new KeymasterException("Invalid user authentication validity duration");
|
||||
return new KeymasterException(keymasterErrorCode,
|
||||
"Invalid user authentication validity duration");
|
||||
default:
|
||||
return new KeymasterException(KeymasterDefs.getErrorMessage(keymasterErrorCode));
|
||||
return new KeymasterException(keymasterErrorCode,
|
||||
KeymasterDefs.getErrorMessage(keymasterErrorCode));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user