MGF1 Digest: Add separate setter
Add a separate setter for the digests used by the MGF1 mask generation
function (for RSA OAEP operations).
Previously the MGF1 digests were specified according to the primary
digests specification, which is not accurate enough.
With the new setter:
* If the user does not explicitly specify MGF1 digests, then the
default (SHA-1) will be specified in the tag passed to Keystore.
* If the user does explicitly specify MGF1 digests, only those
digests will be specified in the tag passed to Keystore.
The SHA-1 digest will not be added.
Bug: 284140060
Test: atest android.security.keystore.KeyGenParameterSpecTest android.security.ParcelableKeyGenParameterSpecTest
Test: atest CtsKeystoreTestCases:android.keystore.cts.CipherTest#testKatBasicWithDifferentProviders
Change-Id: I1521e9b4399ece33c2d17b79133543d490d3b377
9 files changed