That is sort of what I was looking to do but I could see a function in the library that took a byte stream
since I can stream the Xml for my document easily so that would do me
Can you tell me what function I need to use?
Not so much a function. If you create a Reference with a URI that points to the file you want to use, that should do the trick.
So you will need to create a new DOM document, in which you create a DSIGSignature as normal. Then the reference has the URI that points to the file you want to sign and you just sign as normal.
Cheers,
Berin