Am Samstag, den 23.04.2016, 11:16 +0200 schrieb Christophe Raffalli: > By the way what I really need is a hash function for arrays that I can > update when I update one entry in the array. Does anyone known of > such a hash function ? It would have to be commutative then (you need to remove the old version and add the new one, for any element for the array). You could use XOR or + of the hashes of the individual elements. If this doesn't work good enough, I'd try to define larger hash blocks. E.g. consider 4 consecutive elements as a block, and compute the hash of the block, and take the XOR of all blocks you have. Quality depends a little bit on what is in the elements. Gerd -- ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de My OCaml site: http://www.camlcity.org Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------