/** * Extract a public key from a PEM string * * @param pem * @return * @throws Exception */ public static PublicKey decodePublicKey(String pem) throws Exception { byte[] der = pemToDer(pem); return DerUtils.decodePublicKey(der); }