How to sign xml with X509 cert, add digest value and signature to xml template
I am quite new to C# and especially new to Signing with X509. I have an xml template in which I have to add the certificate used (done) and sign the timestamp (TS-1), the binary security token and the body (id-1). Furthermore, I need to write (e.g. replace placeholders) with the digest value of these 3 elements and add the signature value. However, I do not really understand the concept, e.g. how to do this. I read a couple of websites, e.g. signing a xml document with x509 certificate but I cannot adapt the code to my problem. Here is what I tried: public static string SignXml(string template