Hi,

What is the minimum sum of input lengths len(s1)+len(s2) such that:

- s1, s2 are distinct utf8 strings
- Txt2int(s1) = Txt2int(s2)

for the below simple hash function ?

func Txt2int(s string) uint64 {
        x := uint64(len(s))
        for i := len(s) - 1; i >= 0; i-- {
                x = x<<15 ^ x>>49
                x += uint64(s[i])
        }
        return x
}

In general, how good is "minimum sum of colliding input lengths" as a measure 
of collision-resistance for a (not necessarily cryptographic) hash function ?

Thanks..

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to