Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SHA-1

Status
Not open for further replies.

adamwill

Programmer
Jun 19, 2003
18
GB
One of my colleagues has the following requirements, I am not familiar with the terms, but to quote him :-

We are after a library of functions which will

Canonicalise (c14n) an XML document.
Generate a 160-bit binary secure hash from the canonicalised XML using the SHA-1 algorithm.
Encode the binary data using base-64 to produce a 28 character string.
Encode the binary data using base-32 to produce a 32 character string.

I gather he has examples which are in java, but we need a solution which can integrate with VFP. Does anyone have an idea where we can source a solution?

Thanks for any help
 
Thanks, we have tried that and now seem to be able to do everything we need, apart from the last bit

Encode the binary data using base-32 to produce a 32 character string

VFP has it's own function for base-64 but we can't find a way of doing the base-32 bit.


 
I don't know what it means, but I am informed the word is canonicalise (I was given mis-information...)
 
Yes, sorry, I was looking right at the original post and still managed to misspell it. Oh well.

Regards,
Jim
 
It seems the word is "canonicalize".
Think of XML canonical form as a normalized format for XML documents for comparing two XML documents for equality, for example, suppose you wanted to compare documents for versioning or security reasons. The W3C addresses this problem with the XML Canonicalization spec (c14n), which defines a standard form for an XML document that is guaranteed to provide proper bit-wise comparisons and thus consistent digital signatures...
W3C Recommendation.


And from the Wikipedia:
In computing, a canonical order is the order of elements that obeys a certain set of rules or specifications. Sorting algorithms are often used to canonicalize data sets.

In XML Signature canonicalization is the process of converting XML content to a canonical form, to take into account changes that can invalidate a signature over that data (from JWSDP 1.6).
 
Just to be clear, "canonicalize" is a bastardization of English created by programmers who didn't know that "canonize" was the correct term for putting something in canonical order.

Resist the corruption of the language.

Tamar
 

Tamar,

"canonicalize" is a bastardization of English created by programmers who didn't know that "canonize" was the correct term for putting something in canonical order

I took it mean putting something in canonical order while at the same time localizing it <only kidding>.

By the way, my dictionary defines canonize as "to declare (a deceased person) an officially recognized saint". It would be interesting to know where the etymologies of the two meanings converged.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top