code: public static RSAPrivateKey buildPrivateKey(final byte[] keyData)
              throws NoSuchAlgorithmException, InvalidKeySpecException {
          PKCS8EncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec(keyData);
          KeyFactory keyFactory = KeyFactory.getInstance(CIPHER_ALGORITHM);
          PrivateKey generatePrivate = keyFactory.generatePrivate(privateKeySpec);
          return (RSAPrivateKey) generatePrivate;
      }
docs: Construct the RSA private key from a key binary data.
  
  @param keyData
  RSA private key data (value of {@link RSAPrivateKey#getEncoded()})
  @return
  @throws NoSuchAlgorithmException
  @throws InvalidKeySpecException