I am thinking about to concatenate two hashes, but I was searched about this and I have questions, if some one should help me. Thank you
I have two strings str1
and str2
with variable large.
I need obtain a hash of these, but when I was searched I read about problems with collisions and I don't understand that.
In this moment I think that this is sufficient.
cipher = hash(str1) || hash(str2)
But according to other opinions is necessary add other injective function
to prevent resistance collisions
.
That approach looks like this:
cipher = hash(hash(str1) || hash(str2))
What do you think?
EDIT
I use murmur3 with 128.
I have many data and I need to represent this whit hashes, because that I use hash function.
With the time I use the first approach but many collisions have appeared and I don't understand why. I think because I use murmur3 of 128 to everything data or I don't know.