keyBindingAuthSignature = new XMLSignature(
((Element) prototypeKeyBindingElement)
.getOwnerDocument(), "",
XMLSignature.ALGO_ID_MAC_HMAC_SHA1,
Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS);
Transforms transforms = new Transforms(
((Element) prototypeKeyBindingElement)
.getOwnerDocument());
transforms
.addTransform(Transforms.TRANSFORM_C14N_EXCL_OMIT_COMMENTS);
keyBindingAuthSignature.addDocument(
prototypeKeyBindingRefId, transforms,
MessageDigestAlgorithm.ALGO_ID_DIGEST_SHA1);
keyBindingAuthSignature.sign(key);