code: public static PrivateKey readPrivateKey(final byte[] privateKeyBytes, final String algorithm)
  		throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException
  	{
  		final PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(privateKeyBytes);
  		final KeyFactory keyFactory = KeyFactory.getInstance(algorithm);
  		final PrivateKey privateKey = keyFactory.generatePrivate(keySpec);
  		return privateKey;
  	}
docs: Reads the given byte array with the given algorithm and returns the {@link PrivateKey}
  object.
  
  @param privateKeyBytes
  the byte array that contains the private key bytes
  @param algorithm
  the algorithm for the {@link KeyFactory}
  @return the {@link PrivateKey} object
  @throws NoSuchAlgorithmException
  is thrown if instantiation of the cypher object fails.
  @throws InvalidKeySpecException
  is thrown if generation of the SecretKey object fails.
  @throws NoSuchProviderException
  is thrown if the specified provider is not registered in the security provider
  list.