Reject AlgorithmParameters of wrong type.

This makes Android Keystore Cipher implementations reject rather than
ignore AlgorithmParameters of wrong algorithm type. The danger in not
doing so is that a Cipher will produce output that does not actually
depend on the provided AlgorithmParameters.

Bug: 22330716
Change-Id: Ifa9de2c74f2fe4b738a3731c895059dddd075a13
2 files changed