P
Pollux
Hi
I previously posted a question which hasn't been answered, so I figured
it must have been too complicated. I must admit that I didn't make it
very easy to follow. In fact, the information I need is quite simple.
How to canonicalize an XML Document in C#? Consider the following code:
XmlDocument myDoc = new XmlDocument();
myDoc.Load("somefile.xml");
XmlDsigC14NTransform t = new XmlDsigC14NTransform();
t.LoadInput (myDoc);
Stream s = (Stream) t.GetOutput(typeof(Stream));
SHA1 sha1 = SHA1.Create();
byte[] hash = sha1.ComputeHash(s);
Does s represent a stream of a canonicalized document?
I previously posted a question which hasn't been answered, so I figured
it must have been too complicated. I must admit that I didn't make it
very easy to follow. In fact, the information I need is quite simple.
How to canonicalize an XML Document in C#? Consider the following code:
XmlDocument myDoc = new XmlDocument();
myDoc.Load("somefile.xml");
XmlDsigC14NTransform t = new XmlDsigC14NTransform();
t.LoadInput (myDoc);
Stream s = (Stream) t.GetOutput(typeof(Stream));
SHA1 sha1 = SHA1.Create();
byte[] hash = sha1.ComputeHash(s);
Does s represent a stream of a canonicalized document?