code: public static RSAPublicKey buildPublicKey(byte[] keyData)
              throws NoSuchAlgorithmException, InvalidKeySpecException {
          X509EncodedKeySpec publicKeySpec = new X509EncodedKeySpec(keyData);
          KeyFactory keyFactory = KeyFactory.getInstance(CIPHER_ALGORITHM);
          PublicKey generatePublic = keyFactory.generatePublic(publicKeySpec);
          return (RSAPublicKey) generatePublic;
      }
docs: Construct the RSA public key from a key binary data.
  
  @param keyData
  RSA public key data (value of {@link RSAPublicKey#getEncoded()})
  @return
  @throws NoSuchAlgorithmException
  @throws InvalidKeySpecException