Android Encryption RSA InvalidKeyException
问题 Dears, I need help to understand why decryptString doesn't work and throw "java.security.InvalidKeyException: Need RSA private or public key". When call encrypt method, i use public key by the private key/certificate. Thanks for any help! public class KeysHandler { /*** * Generate and store in AndroidKeyStore a security KeyPair keys. * @param alias - Alias to create the key. * @return KeyPair object with: private and public key. */ public static KeyPair generateKeyPair(String alias) { KeyPair