src/main/java/at/favre/tools/dice/service/randomorg/RandomOrgUtil.java
static PublicKey parsePublicKey(byte[] keyBytes) throws Exception {
        CertificateFactory fact = CertificateFactory.getInstance("X.509");
        X509Certificate cer = (X509Certificate) fact.generateCertificate(new ByteArrayInputStream(keyBytes));
        return cer.getPublicKey();
    }
/**
     * Parses a public key in X.509 format
     *
     * @param keyBytes the raw bytes of the certificate
     * @return the java POJO pub key
     * @throws Exception if the certificate could not be parsed
     */
Parses a public key in X.509 format
@param keyBytes the raw bytes of the certificate
@return the java POJO pub key
@throws Exception if the certificate could not be parsed
Parses a public key in X . 509 format @param keyBytes the raw bytes of the certificate @return the java POJO pub key @throws Exception if the certificate could not be parsed
static PublicKey parsePublicKey(byte[] keyBytes) throws Exception {
        CertificateFactory fact = CertificateFactory.getInstance("X.509");
        X509Certificate cer = (X509Certificate) fact.generateCertificate(new ByteArrayInputStream(keyBytes));
        return cer.getPublicKey();
    }
static PublicKey parsePublicKey ( byte [ ] keyBytes ) throws Exception { CertificateFactory fact = CertificateFactory . getInstance ( "X.509" ) ; X509Certificate cer = ( X509Certificate ) fact . generateCertificate ( new ByteArrayInputStream ( keyBytes ) ) ; return cer . getPublicKey ( ) ; }
Parses a public key in X.509 format
 @param keyBytes the raw bytes of the certificate
 @return the java POJO pub key
 @throws Exception if the certificate could not be parsed
Parses a public key in X . 509 format @param keyBytes the raw bytes of the certificate @return the java POJO pub key @throws Exception if the certificate could not be parsed