diff --git a/VectoCommon/VectoHashing/IVectoHash.cs b/VectoCommon/VectoHashing/IVectoHash.cs
index abde7e5a40045be6efcdd8a9dd79d8063a8c32e6..7c282717a8a5b03373b1d0cde77f06dc5f95b3cc 100644
--- a/VectoCommon/VectoHashing/IVectoHash.cs
+++ b/VectoCommon/VectoHashing/IVectoHash.cs
@@ -5,7 +5,7 @@ namespace TUGraz.VectoHashing
 {
 	public interface IVectoHash
 	{
-		IEnumerable<VectoComponents> GetContainigComponents();
+		IList<VectoComponents> GetContainigComponents();
 
 		string ComputeHash();
 
diff --git a/VectoCommon/VectoHashing/VectoComponents.cs b/VectoCommon/VectoHashing/VectoComponents.cs
index 256599f30f42ac97c984ce8183d8bd65a24c520f..7b0ab169cee59d49decc7da151f128013df4c861 100644
--- a/VectoCommon/VectoHashing/VectoComponents.cs
+++ b/VectoCommon/VectoHashing/VectoComponents.cs
@@ -43,5 +43,29 @@ namespace TUGraz.VectoHashing
 					throw new ArgumentOutOfRangeException("VectoComponents", component, null);
 			}
 		}
+
+		public static string HashIdPrefix(this VectoComponents component)
+		{
+			switch (component) {
+				case VectoComponents.Engine:
+					return "ENG-";
+				case VectoComponents.Gearbox:
+					return "GBX-";
+				case VectoComponents.Axlegear:
+					return "AXL-";
+				case VectoComponents.Retarder:
+					return "RET-";
+				case VectoComponents.TorqueConverter:
+					return "TC-";
+				case VectoComponents.Angledrive:
+					return "ANGL-";
+				case VectoComponents.Airdrag:
+					return "AD-";
+				case VectoComponents.Tyre:
+					return "TYRE-";
+				default:
+					throw new ArgumentOutOfRangeException("VectoComponents", component, null);
+			}
+		}
 	}
 }
\ No newline at end of file
diff --git a/VectoCommon/VectoHashing/VectoHash.cs b/VectoCommon/VectoHashing/VectoHash.cs
index 699c7b75b8f0cc433ca7d80ad4a056b046826529..dbfbd75d17eb6b20a244e0c7942e20bcbaa0113d 100644
--- a/VectoCommon/VectoHashing/VectoHash.cs
+++ b/VectoCommon/VectoHashing/VectoHash.cs
@@ -1,6 +1,7 @@
 using System;
 using System.Collections;
 using System.Collections.Generic;
+using System.ComponentModel;
 using System.IO;
 using System.Linq;
 using System.Xml;
@@ -50,7 +51,7 @@ namespace TUGraz.VectoHashing
 			Helper.AddNamespaces(Manager);
 		}
 
-		public IEnumerable<VectoComponents> GetContainigComponents()
+		public IList<VectoComponents> GetContainigComponents()
 		{
 			var retVal = new List<VectoComponents>();
 			foreach (var component in EnumHelper.GetValues<VectoComponents>()) {
@@ -78,10 +79,43 @@ namespace TUGraz.VectoHashing
 
 		public XDocument AddHash()
 		{
-			var toSign = GetIdForElement(GetComponentQueryString());
-			var hash = XMLHashProvider.ComputeHash(document, toSign);
+			var components = GetContainigComponents();
+			if (components.Count > 1) {
+				throw new Exception("can only add hash for a single component!");
+			}
+			if (components[0] == VectoComponents.Vehicle) {
+				throw new Exception("adding hash for Vehicle is not supported");
+			}
+			var query = string.Format("//*[local-name()='{0}']/*[local-name()='Data']", components[0]);
+			var node = document.SelectSingleNode(query);
+			if (node == null) {
+				throw new Exception(string.Format("'Data' element for component {0} not found!", components[0]));
+			}
+			var attributes = node.Attributes;
+			var id = components[0].HashIdPrefix() + Guid.NewGuid().ToString("n").Substring(0, 20);
+			var idSet = false;
+			if (attributes != null && attributes[XMLNames.Component_ID_Attr] != null) {
+				attributes[XMLNames.Component_ID_Attr].Value = id;
+				idSet = true;
+			}
+			if (!idSet) {
+				var attr = document.CreateAttribute(XMLNames.Component_ID_Attr);
+				attr.Value = id;
+				if (node.Attributes == null) {
+					throw new Exception("failed to add 'id' attribute");
+				}
+				node.Attributes.Append(attr);
+			}
 
-			return null;
+			var hash = XMLHashProvider.ComputeHash(document, id);
+			var sig = document.CreateElement(XMLNames.DI_Signature, node.NamespaceURI);
+
+			if (node.ParentNode == null || hash.DocumentElement == null) {
+				throw new Exception("Invalid format of document and/or created hash");
+			}
+			sig.AppendChild(document.ImportNode(hash.DocumentElement, true));
+			node.ParentNode.AppendChild(sig);
+			return document.ToXDocument();
 		}
 
 		public string ReadHash()
diff --git a/VectoCommon/VectoHashingTest/VectoHashTest.cs b/VectoCommon/VectoHashingTest/VectoHashTest.cs
index 3f1a5a438c6b2f659765f3d9e6528e4841a17e99..cc5f83c12d82a77edd0abbde229772ea98299006 100644
--- a/VectoCommon/VectoHashingTest/VectoHashTest.cs
+++ b/VectoCommon/VectoHashingTest/VectoHashTest.cs
@@ -1,4 +1,7 @@
-using System.Linq;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Xml;
 using NUnit.Framework;
 using TUGraz.VectoHashing;
 using Assert = NUnit.Framework.Assert;
@@ -89,5 +92,24 @@ namespace VectoHashingTest
 
 			Assert.AreEqual(expectedHash, hash);
 		}
+
+
+		[TestCase(@"Testdata\XML\ToHash\vecto_engine-input.xml"),
+		TestCase(@"Testdata\XML\ToHash\vecto_gearbox-input.xml")]
+		public void TestAddHash(string file)
+		{
+			var destination = Path.GetFileNameWithoutExtension(file) + "_hashed.xml";
+
+			var h = VectoHash.Load(file);
+			var r = h.AddHash();
+
+			var writer = new XmlTextWriter(destination, Encoding.UTF8);
+			r.WriteTo(writer);
+			writer.Flush();
+			writer.Close();
+
+			var h2 = VectoHash.Load(destination);
+			Assert.IsTrue(h2.ValidateHash());
+		}
 	}
 }
\ No newline at end of file
diff --git a/VectoCommon/VectoHashingTest/VectoHashingTest.csproj b/VectoCommon/VectoHashingTest/VectoHashingTest.csproj
index 5b72742a8a0e3bfd6e65e93d9518e52f23f15b5a..d11e7b567f5cd8fd05cd7f4e7c668001bfc7594f 100644
--- a/VectoCommon/VectoHashingTest/VectoHashingTest.csproj
+++ b/VectoCommon/VectoHashingTest/VectoHashingTest.csproj
@@ -72,6 +72,12 @@
     <Content Include="Testdata\XML\simple_document.xml">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
+    <Content Include="Testdata\XML\ToHash\vecto_engine-input.xml">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Testdata\XML\ToHash\vecto_gearbox-input.xml">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
     <Content Include="Testdata\XML\Variations\vecto_engine-sample Encoding ISO 8859-15.xml">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>