How to recover a RSA public key from a byte[] array?
I’m wondering if it’s possible to recover a RSA public key that I have converted to byte array previously. byte[] keyBytes = publicKey.getEncoded(); Thanks for the help. Answer PublicKey publicKey = KeyFactory.getInstance(“RSA”).generatePublic(new X509EncodedKeySpec(bytes)); For more info see this tutorial AttributionSource : Link , Question Author : kiewic , Answer Author : madth3