if (nl.getLength() == 0) {
throw new Exception("Couldn't find signature Element");
}
Element sigElement = (Element) nl.item(0);
XMLSignature signature = new XMLSignature(sigElement, file.toURI().toString());
SecretKey sk = signature.createSecretKey("secret".getBytes("ASCII"));
return signature.checkSignatureValue(sk);
}
private SecretKey getSecretKey(final byte[] secret) {
return new SecretKey() {