public static PublicKey readPemPublicKey ( final File file ) throws IOException , NoSuchAlgorithmException , InvalidKeySpecException , NoSuchProviderException { final String publicKeyAsString = readPemFileAsBase64 ( file ) ; final byte [ ] decoded = Base64 . decodeBase64 ( publicKeyAsString ) ; return readPublicKey ( decoded ) ; }
reads a public key from a file .