473,387 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Hashing Elements

Is there a way to create a hash of an element with all of its descendants?
I want to uniquely identify an element within a XML document not by its
position but by its content (not concatenated string values). Something
like a hashed Infoset of an element in a Base64 format.

The reason why I want to do this is because different users of the document
apply different values to the elements in the document.

Right now, I'm running the XML file through a MD5 algorithm which produces a
hash of the file. Then, I save that hash to a file with the values the user
applys to that document, but this approach doesn't allow for the elements to
change their position within the document.

I know XML Digital Signatures might be what I want, but I don't know where
to begin. I'm currently using MSXML4 and .NET for my XML work. Is where
any hope for me?

Jul 20 '05 #1
1 1499
Regarding this well-known quote, often attributed to Mike King's famous
"Fri, 30 Jul 2004 13:36:10 -0400" speech:
Is there a way to create a hash of an element with all of its descendants?
I want to uniquely identify an element within a XML document not by its
position but by its content (not concatenated string values). Something
like a hashed Infoset of an element in a Base64 format.

The reason why I want to do this is because different users of the document
apply different values to the elements in the document.

Right now, I'm running the XML file through a MD5 algorithm which produces a
hash of the file. Then, I save that hash to a file with the values the user
applys to that document, but this approach doesn't allow for the elements to
change their position within the document.

I know XML Digital Signatures might be what I want, but I don't know where
to begin. I'm currently using MSXML4 and .NET for my XML work. Is where
any hope for me?


You could just pull out indicative portions of the data, sorted into a
particular order, either via a processing script, or with an XSLT
transform, then MD5 that. If things might change order, just force them
into order with a sort.

--
-- Rudy Fleminger
-- sp@mmers.and.evil.ones.will.bow-down-to.us
(put "Hey!" in the Subject line for priority processing!)
-- http://www.pixelsaredead.com
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: snowteo | last post by:
Hi,I have to do this exercises can you help me: 1)Write a program to implement exetendible hashing.If the table is small enough to fin in main memory,how does its performance compare with open and...
11
by: Wm. Scott Miller | last post by:
Hello all! We are building applications here and have hashing algorithms to secure secrets (e.g passwords) by producing one way hashes. Now, I've read alot and I've followed most of the advice...
3
by: myPosts | last post by:
Hi all, I am having class which is derived from collectionbase class. I am adding some string elements to this collection. What i want is to add support of hashing into class which i have...
19
by: Ole Nielsby | last post by:
How does the GetHashCode() of an array object behave? Does it combine the GetHashCode() of its elements, or does it create a sync block for the object? I want to use readonly arrays as...
14
by: Ron M. Newman | last post by:
Hi group, I need similar functionality I'm getting from the hashtable, but without the value .all I need is keys. this of course negates the need for "hashing", but I wanted to know if there's a...
8
by: Maya | last post by:
Hello all, I'm using MD5 hashing in my application to give unique values to huge list of items my application receives, originally every item's name was difficult to use as an id for this item...
1
by: snipes2002 | last post by:
hi all i want to make a java code to build a 16 element array and do the following things ( insert , search , delete ) using a hashing function (j mod (arraysize)) and if the index is occupied so...
1
by: Tinku | last post by:
Hi friends I know Static Hashing and i know about Dynamic Hashing, still i have problem to make program with Dynamic Hashing I am new in "C" world, please help me, my problem is: i have to...
15
by: Vinodh | last post by:
I am reading about hashing techniques. The map data structure available in C++ STL uses hashing techniques?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.