diff --git a/VectoCommon/VectoHashing/Impl/XmlHashProvider.cs b/VectoCommon/VectoHashing/Impl/XmlHashProvider.cs index 57001c4078940fef1d8c30704a3fe749b79e5dbc..9bdddd9523544ede53b865b5e7da5c7fb5d20feb 100644 --- a/VectoCommon/VectoHashing/Impl/XmlHashProvider.cs +++ b/VectoCommon/VectoHashing/Impl/XmlHashProvider.cs @@ -29,37 +29,37 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ -using System; -using System.Security.Cryptography; -using System.Security.Cryptography.Xml; -using System.Xml; - -namespace TUGraz.VectoHashing.Impl -{ - public class XMLHashProvider - { - public static XmlDocument ComputeHash(XmlDocument doc, string elementId) - { - if (doc == null) { - throw new Exception("Invalid Document"); - } - var signedXml = new SignedXml(doc); - var reference = new Reference("#" + elementId) { - DigestMethod = "http://www.w3.org/2001/04/xmlenc#sha256" - }; - reference.AddTransform(new XmlDsigVectoTransform()); - reference.AddTransform(new XmlDsigExcC14NTransform()); - - - signedXml.AddReference(reference); - signedXml.ComputeSignature(HMAC.Create()); - var xmlDigitalSignature = reference.GetXml(); - - var sigdoc = new XmlDocument(); - sigdoc.CreateElement("Signature"); - sigdoc.AppendChild(sigdoc.ImportNode(xmlDigitalSignature, true)); - - return sigdoc; - } - } +using System; +using System.Security.Cryptography; +using System.Security.Cryptography.Xml; +using System.Xml; + +namespace TUGraz.VectoHashing.Impl +{ + public class XMLHashProvider + { + public static XmlDocument ComputeHash(XmlDocument doc, string elementId) + { + if (doc == null) { + throw new Exception("Invalid Document"); + } + var signedXml = new SignedXml(doc); + var reference = new Reference("#" + elementId) { + DigestMethod = "http://www.w3.org/2001/04/xmlenc#sha256" + }; + reference.AddTransform(new XmlDsigVectoTransform()); + reference.AddTransform(new XmlDsigExcC14NTransform()); + + + signedXml.AddReference(reference); + signedXml.ComputeSignature(HMAC.Create()); + var xmlDigitalSignature = reference.GetXml(); + + var sigdoc = new XmlDocument(); + sigdoc.CreateElement("Signature"); + sigdoc.AppendChild(sigdoc.ImportNode(xmlDigitalSignature, true)); + + return sigdoc; + } + } } \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs index a3c29bfca4aa9200810e8a044d1ec48f25d553db..0e96a009d92372a031687c7d240c35012cd41da8 100644 --- a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs +++ b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs @@ -118,7 +118,7 @@ namespace TUGraz.VectoCore.Models.Declaration }; public static readonly MeterPerSecond MinSpeed = 50.KMPHtoMeterPerSecond(); - public static readonly MeterPerSecond OverSpeed = 5.KMPHtoMeterPerSecond(); + public static readonly MeterPerSecond OverSpeed = 2.5.KMPHtoMeterPerSecond(); public static readonly MeterPerSecond UnderSpeed = 5.KMPHtoMeterPerSecond(); }