Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit da114373 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

avoid using deprecated method when computing xml hash

parent 59988058
No related branches found
No related tags found
No related merge requests found
......@@ -93,6 +93,8 @@ namespace TUGraz.VectoHashing.Impl
throw new Exception($"CanonicalizationMethod(s) {string.Join(", ", unsupported)} not supported!");
}
// load any HMAC algorithm so that the key is also available. the HVAC algorithm used is the one set in the Reference object below
var hmac = HMAC.Create("HMACSHA256");
var signedXml = new SignedXml(doc);
var reference = new Reference("#" + elementId) {
DigestMethod = digestMethod
......@@ -102,7 +104,7 @@ namespace TUGraz.VectoHashing.Impl
}
signedXml.AddReference(reference);
signedXml.ComputeSignature(HMAC.Create());
signedXml.ComputeSignature(hmac);
var xmlDigitalSignature = reference.GetXml();
var sigdoc = new XmlDocument();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment