public boolean hasValidSignature(SignedIdentityDocument doc, PublicKey publicKey) {
        try {
            Signature signer = SignatureUtils.createVerifier(publicKey);
            signer.initVerify(publicKey);
            signer.update(doc.data().getBytes(UTF_8));
            return signer.verify(Base64.getDecoder().decode(doc.signature()));
        } catch (GeneralSecurityException e) {
            throw new RuntimeException(e);
        }
    }
Generates and validates the signature for a {@link SignedIdentityDocument}

@author bjorncs
vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/IdentityDocumentSigner.java