} catch (NoSuchAlgorithmException nsae) {
throw new XMLSignatureException(nsae);
}
}
signature.initSign((PrivateKey)key);
<BUG>if (LOG.isDebugEnabled()) {
LOG.debug("Signature provider:" + signature.getProvider());

LOG.debug("Signing with key: " + key);

LOG.debug("JCA Algorithm: " + getJCAAlgorithm());

}</BUG>
try (SignerOutputStream outputStream = new SignerOutputStream(signature)) {

} catch (NoSuchAlgorithmException nsae) {
throw new XMLSignatureException(nsae);
}
}
signature.initVerify((PublicKey)key);
LOG.debug("Signature provider: {}", signature.getProvider());
LOG.debug("Verifying with key: {}", key);
LOG.debug("JCA Algorithm: {}", getJCAAlgorithm());
LOG.debug("Signature Bytes length: {}", sig.length);
try (SignerOutputStream outputStream = new SignerOutputStream(signature)) {
