lib/misc/crc_hash.h
changeset 0 6f7a81934006
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/misc/crc_hash.h	Wed Jan 16 22:39:43 2008 +0100
@@ -0,0 +1,17 @@
+#ifndef CRC_HASH__H__
+#define CRC_HASH__H__
+
+#include "misc/crc32.h"
+
+class crc_hash
+{
+public:
+  unsigned operator()(const mystring& key) const
+    {
+      crc32_c crc;
+      crc.update(key.c_str(), key.length());
+      return crc;
+    }
+};
+
+#endif