try {
Signature signature = Signature.getInstance("SHA256withECDSA");
signature.initVerify(logInfo.getKey());
signature.update(toVerify);
return signature.verify(sct.getSignature().getSignature().toByteArray());
} catch (SignatureException e) {
throw new CertificateTransparencyException("Signature object not properly initialized or"
+ " signature from SCT is improperly encoded.", e);
} catch (InvalidKeyException e) {
throw new CertificateTransparencyException("Log's public key cannot be used", e);