xml security - Digital Signature - sign digest value pre calculated

Hi all,

I'd like to perform a Digital Signature (sign) of an existing digest value pre calculated . Does anybody could please tell me some more about it?

Looking at specicctions (apis) the signature is performed in one operation, within by given "object" to be signed, the method calculate the hash value (digest) and finally sign it. I have to do this operation in 2 steps :

1) calcutate the hash value (c++ ) (this wok fine)

2 calcutate the Signature using the hash

Thanks

Matteo

[526 byte] By [2407500518951768323a] at [2007-11-27 7:10:38]
# 1

I assume you are referring to the JSR 105 API for XML Digital Signatures? If so, yes

you can generate your own digest values. Just use the XMLSignatureFactory.newReference

method that takes a pre-calculated digest value:

http://java.sun.com/javase/6/docs/api/javax/xml/crypto/dsig/XMLSignatureFactory.html#newReference(java.lang.String,%20javax.xml.crypto.dsig.DigestMethod,%20java.util.List,%20java.lang.String,%20java.lang.String,%20byte[])

smullana at 2007-7-12 19:02:11 > top of Java-index,Security,Other Security APIs, Tools, and Issues...