EC keys don't support DECRYPT (only AGREE_KEY for key derivation). Without this guard, an EC DECRYPT operation creates a CipherPrimitive that fails with a confusing JCA error instead of returning UNSUPPORTED_PURPOSE upfront.
EC keys don't support DECRYPT (only AGREE_KEY for key derivation). Without this guard, an EC DECRYPT operation creates a CipherPrimitive that fails with a confusing JCA error instead of returning UNSUPPORTED_PURPOSE upfront.