Keystore operation failed :Incompatible padding mode
问题 I am using AndroidKeystore to generate RSA Keypair and doing encryption and decryption using this keypair My keypair generation code looks like this var keypairGen:KeyPairGenerator = KeyPairGenerator.getInstance(KeyProperties.KEY_ALGORITHM_RSA, "AndroidKeyStore") var keyPairGeneratorSpec: KeyGenParameterSpec = KeyGenParameterSpec .Builder(this.Key_Name, KeyProperties.PURPOSE_ENCRYPT or KeyProperties.PURPOSE_DECRYPT) .setDigests(KeyProperties.DIGEST_SHA256, KeyProperties.DIGEST_SHA512)