Friday, January 04, 2008

Fun with Python

So I spent some time with a friend and the Hash Analysis Tool today. In Python,

  • 'osmosed' hash = 'wicking' hash
and because of that,
  • 'osmosed1' hash = 'wicking1' hash
That's all very nice. However, the following two are equal
  • frozenset('osmosed', 'wicking') hash
  • frozenset('osmosed1', 'wicking1') hash
And it turns out that if a frozen set has elements the hashes of which are the same, and the count of elements in the frozen set is even, then the hashes of the frozen sets are equal regardless of the contents.

Fun stuff!

No comments: