in reply to Re: ascii to binary
in thread ascii to binary

thanks a lot !

to answer the previous reply, my words are like :

- 1237_at, 23493_s_at, ...
- gsm12832, gsm23948, ...
- or just float values.


the idea was to derive a hash (thanks for respelling what i wanted to do !) of these 3 lists, and then have an ID like EA3D4B which would be unique, and independant of the order in which the words were given in each list.

I think this will work perfectly, thanks again.

marcel

Replies are listed 'Best First'.
Re^3: ascii to binary
by GrandFather (Saint) on Dec 04, 2006 at 19:01 UTC

    Note that an MD5 sum is not independent of the order of the words. You could however split, sort, then join to get the words in the same order each time.

    Your first technique would more properly be called a checksum and is independent of character order.

    Note too that 16 bits does not produce a very unique result compared with an MD5 hash which uses 128 bits. Depending on how many strings you are working with, there may be a fairly high chance that you will get identical checksums for different strings using only 16 bits.


    DWIM is Perl's answer to Gödel