Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Hashing Elements

Reply
Thread Tools

Hashing Elements

 
 
Mike King
Guest
Posts: n/a
 
      07-30-2004
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?



 
Reply With Quote
 
 
 
 
FLEB
Guest
Posts: n/a
 
      08-17-2004
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
-- http://www.velocityreviews.com/forums/(E-Mail Removed)-down-to.us
(put "Hey!" in the Subject line for priority processing!)
-- http://www.pixelsaredead.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hashing Passwords Showjumper ASP .Net 2 12-22-2005 12:20 AM
Password Hashing and User Authentication =?Utf-8?B?QnJpYW4=?= ASP .Net 0 06-06-2005 01:37 PM
Password Hashing and Salting - Recommended Reading Guadala Harry ASP .Net 4 09-12-2004 08:43 PM
Password hashing anonymous@coolgroups.com Java 3 04-15-2004 10:45 PM
Hashing TT \(Tom Tempelaere\) Java 6 02-08-2004 11:38 AM



Advertisments