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

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

creating new project

parent 1095c5e7
No related branches found
No related tags found
No related merge requests found
......@@ -50,14 +50,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VectoAPI Test", "..\VECTO_A
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VectoEngineeringAPI", "..\VECTO_API\VectoEngineeringAPI\VectoEngineeringAPI.csproj", "{41314A40-AB3E-4F43-B1A4-58443F4014F2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VectoEngineeringAPITest", "..\VECTO_API\VectoEngineeringAPITest\VectoEngineeringAPITest.csproj", "{35FBDFEF-07E6-4E2C-8C18-4753266A6EDE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Excel2XML", "..\VECTO_API\Excel2XML\Excel2XML.csproj", "{749F150A-F974-46DC-A1E2-F4153C54FC0D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VectoDB", "..\VECTO_API\VectoDB\VectoDB.csproj", "{2C58BA97-2954-4D19-920F-A24B78FC80A4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VectoCore BugReportTests", "..\VECTO-Bugreports\BugReportTests\VectoCore BugReportTests.csproj", "{7C364099-9B85-473A-8A42-BBEBE4798FF5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VectoHashing", "VectoCommon\VectoHashing\VectoHashing.csproj", "{B673E12F-D323-4C4C-8805-9915B2C72D3D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
......@@ -204,14 +204,6 @@ Global
{41314A40-AB3E-4F43-B1A4-58443F4014F2}.Release|Any CPU.Build.0 = Release|Any CPU
{41314A40-AB3E-4F43-B1A4-58443F4014F2}.Release|x64.ActiveCfg = Release|Any CPU
{41314A40-AB3E-4F43-B1A4-58443F4014F2}.Release|x86.ActiveCfg = Release|Any CPU
{35FBDFEF-07E6-4E2C-8C18-4753266A6EDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{35FBDFEF-07E6-4E2C-8C18-4753266A6EDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{35FBDFEF-07E6-4E2C-8C18-4753266A6EDE}.Debug|x64.ActiveCfg = Debug|Any CPU
{35FBDFEF-07E6-4E2C-8C18-4753266A6EDE}.Debug|x86.ActiveCfg = Debug|Any CPU
{35FBDFEF-07E6-4E2C-8C18-4753266A6EDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{35FBDFEF-07E6-4E2C-8C18-4753266A6EDE}.Release|Any CPU.Build.0 = Release|Any CPU
{35FBDFEF-07E6-4E2C-8C18-4753266A6EDE}.Release|x64.ActiveCfg = Release|Any CPU
{35FBDFEF-07E6-4E2C-8C18-4753266A6EDE}.Release|x86.ActiveCfg = Release|Any CPU
{749F150A-F974-46DC-A1E2-F4153C54FC0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{749F150A-F974-46DC-A1E2-F4153C54FC0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{749F150A-F974-46DC-A1E2-F4153C54FC0D}.Debug|x64.ActiveCfg = Debug|Any CPU
......@@ -236,6 +228,14 @@ Global
{7C364099-9B85-473A-8A42-BBEBE4798FF5}.Release|Any CPU.Build.0 = Release|Any CPU
{7C364099-9B85-473A-8A42-BBEBE4798FF5}.Release|x64.ActiveCfg = Release|Any CPU
{7C364099-9B85-473A-8A42-BBEBE4798FF5}.Release|x86.ActiveCfg = Release|Any CPU
{B673E12F-D323-4C4C-8805-9915B2C72D3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B673E12F-D323-4C4C-8805-9915B2C72D3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B673E12F-D323-4C4C-8805-9915B2C72D3D}.Debug|x64.ActiveCfg = Debug|Any CPU
{B673E12F-D323-4C4C-8805-9915B2C72D3D}.Debug|x86.ActiveCfg = Debug|Any CPU
{B673E12F-D323-4C4C-8805-9915B2C72D3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B673E12F-D323-4C4C-8805-9915B2C72D3D}.Release|Any CPU.Build.0 = Release|Any CPU
{B673E12F-D323-4C4C-8805-9915B2C72D3D}.Release|x64.ActiveCfg = Release|Any CPU
{B673E12F-D323-4C4C-8805-9915B2C72D3D}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......@@ -254,9 +254,9 @@ Global
{512C2CD1-E5BE-4F6B-943B-2BFA7E0CBD64} = {D29E62A2-CF08-469F-B29F-1B25DCB35386}
{D959CB7C-F514-4F5E-9C33-684D0012474B} = {D29E62A2-CF08-469F-B29F-1B25DCB35386}
{41314A40-AB3E-4F43-B1A4-58443F4014F2} = {D29E62A2-CF08-469F-B29F-1B25DCB35386}
{35FBDFEF-07E6-4E2C-8C18-4753266A6EDE} = {D29E62A2-CF08-469F-B29F-1B25DCB35386}
{749F150A-F974-46DC-A1E2-F4153C54FC0D} = {351FF7E8-B56B-445E-8E98-A61E07C990DA}
{2C58BA97-2954-4D19-920F-A24B78FC80A4} = {D29E62A2-CF08-469F-B29F-1B25DCB35386}
{7C364099-9B85-473A-8A42-BBEBE4798FF5} = {CC93EA68-F3FE-4BCB-9292-1101F94A4D09}
{B673E12F-D323-4C4C-8805-9915B2C72D3D} = {73A5BF70-6168-456F-95E5-A1402BFA488C}
EndGlobalSection
EndGlobal
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("VectoHashing")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("VectoHashing")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("334248fa-331e-4255-97fe-617e1a497f6f")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B673E12F-D323-4C4C-8805-9915B2C72D3D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>TUGraz.VectoHashing</RootNamespace>
<AssemblyName>VectoHashing</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Security" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="XmlHashProvider.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
using System;
using System.IO;
using System.Security.Cryptography;
using System.Security.Cryptography.Xml;
using System.Xml;
namespace VectoDB
{
public class XmlHashProvider
{
protected string File;
public XmlHashProvider(string file)
{
File = file;
}
public string ComputeHash(string xpath)
{
var xml = new XmlDocument() { PreserveWhitespace = true };
var manager = new XmlNamespaceManager(xml.NameTable);
manager.AddNamespace("ved", "urn:tugraz:ivt:VectoAPI:EngineeringDefinitions:v0.6");
manager.AddNamespace("tns", "urn:tugraz:ivt:VectoAPI:EngineeringInput:v0.6");
using (var fs = new FileStream(File, FileMode.Open)) {
using (var sr = new StreamReader(fs)) {
xml.Load(new LineCleaningTextReader(sr));
}
}
var nodeList = xml.SelectNodes(string.Format("{0}/descendant-or-self::node()|{0}//@*", xpath), manager);
if (nodeList == null || nodeList.Count == 0) {
throw new Exception(string.Format("Selected node '{0}' not found in input!", xpath));
}
var transform = new XmlDsigC14NTransform();
transform.LoadInput(nodeList);
var sha256 = new SHA256CryptoServiceProvider();
var hash = sha256.ComputeHash((Stream)transform.GetOutput(typeof(Stream)));
return Convert.ToBase64String(hash);
}
private class LineCleaningTextReader : TextReader
{
private readonly TextReader _src;
public LineCleaningTextReader(TextReader src)
{
_src = src;
}
public override int Read()
{
int r = _src.Read();
switch (r) {
case 0xD: // \r
switch (_src.Peek()) {
case 0xA:
case 0x85: // \n or NEL char
_src.Read();
break;
}
return 0xA;
case 0x85: //NEL
return 0xA;
default:
return r;
}
}
}
}
}
\ No newline at end of file
......@@ -10,10 +10,18 @@
<File FilePath="VectoCoreTest\TestData\XML\XMLReaderEngineering\engineering_job-sample_ref.xml" HomeFolder="Yes"/>
<File FilePath="VectoCoreTest\TestData\XML\XMLReaderEngineering\engineering_retarder-sample_ref.xml" HomeFolder="Yes"/>
<File FilePath="VectoCoreTest\TestData\XML\XMLReaderEngineering\engineering_vehicle_ref.xml" HomeFolder="Yes"/>
<File FilePath="VectoCoreTest\TestData\XML\Hashing\vecto_engine-sample Encoding ISO 8859-15.xml" HomeFolder="Yes"/>
<File FilePath="VectoCoreTest\TestData\XML\Hashing\vecto_engine-sample Encoding UTF-16 BE BOM.xml" HomeFolder="Yes"/>
<File FilePath="VectoCoreTest\TestData\XML\Hashing\vecto_engine-sample Encoding UTF-16 LE.xml" HomeFolder="Yes"/>
<File FilePath="VectoCoreTest\TestData\XML\Hashing\vecto_engine-sample Encoding UTF-8 BOM.xml" HomeFolder="Yes"/>
<File FilePath="VectoCoreTest\TestData\XML\Hashing\vecto_engine-sample Encoding UTF-8.xml" HomeFolder="Yes"/>
<File FilePath="VectoCoreTest\TestData\XML\Hashing\vecto_engine-sample Encoding windows-1292.xml" HomeFolder="Yes"/>
<File FilePath="VectoCoreTest\TestData\XML\XMLReaderDeclaration\vecto_engine-sample.xml" HomeFolder="Yes"/>
<File FilePath="VectoCoreTest\TestData\XML\Hashing\vecto_engine-sample_Whitespaces.xml" HomeFolder="Yes"/>
<File FilePath="VectoCoreTest\TestData\XML\XMLReaderDeclaration\vecto_gearbox-sample.xml" HomeFolder="Yes"/>
<File FilePath="VectoCoreTest\TestData\XML\XMLReaderDeclaration\vecto_vehicle-sample.xml" HomeFolder="Yes"/>
<File FilePath="VectoCoreTest\TestData\XML\XMLReaderDeclaration\vecto_vehicle-sample_FULL.xml" HomeFolder="Yes"/>
<File FilePath="VectoCoreTest\TestData\XML\Hashing\vecto_vehicle-sample_FULL_Entry_Order.xml" HomeFolder="Yes"/>
</Folder>
<Folder FolderName="XSL Files" ExtStr="xsl;xslt">
<File FilePath="E:\QUAM\Workspace\VECTO_API\API\RenderTable.xslt" HomeFolder="Yes"/>
......
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