Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

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

avoid soon deprecated constructor method

parent d10e8cd6
No related branches found
No related tags found
No related merge requests found
...@@ -96,6 +96,8 @@ namespace TUGraz.VectoHashing.Impl ...@@ -96,6 +96,8 @@ namespace TUGraz.VectoHashing.Impl
throw new Exception(string.Format("CanonicalizationMethod(s) {0} not supported!", string.Join(", ", unsupported))); throw new Exception(string.Format("CanonicalizationMethod(s) {0} not supported!", string.Join(", ", unsupported)));
} }
// 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 signedXml = new SignedXml(doc);
var reference = new Reference("#" + elementId) { var reference = new Reference("#" + elementId) {
DigestMethod = digestMethod DigestMethod = digestMethod
...@@ -105,7 +107,7 @@ namespace TUGraz.VectoHashing.Impl ...@@ -105,7 +107,7 @@ namespace TUGraz.VectoHashing.Impl
} }
signedXml.AddReference(reference); signedXml.AddReference(reference);
signedXml.ComputeSignature(HMAC.Create()); signedXml.ComputeSignature(hmac);
var xmlDigitalSignature = reference.GetXml(); var xmlDigitalSignature = reference.GetXml();
var sigdoc = new XmlDocument(); var sigdoc = new XmlDocument();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment