Closed pdrvaz closed 5 years ago
http://www.w3.org/2001/04/xmlenc#sha256
means w3c xml encryption, which is not supported yet (only xml signature is supported). I'll see what I can do.
Please check, it should work now
I assume the problem is solved, so I close the issue.
When I create a new Reference to set in SignedXml.AddReference(...), the default DigestValue of the Reference is SignedXml.XmlDsigSHA256Url that has the value "http://www.w3.org/2001/04/xmlenc#sha256".
Otherwise, the CryptoHelpers does not support this algorithm.
I suggest add this two lines lines to CryptoHelpers.CreateForName switch:
In Brasil this algorithm is choosed for the comunication with the eSocial system (government controll of payment of the enterprises of social assurance of his workers).
Besides, the BouncyCastle 1.8.5 library does not support the GOST3411_2012_256Digest and GOST3411_2012_512Digest classes anymore. I don't khown if its replaced or deprecated.
This library is the best that I found for the job. Congratulations.
Thanks, Pedro Vaz