Logo Search packages:      
Sourcecode: fastforward version File versions  Download package

cdb_hash.c

#include "cdb.h"

uint32 cdb_hash(buf,len)
unsigned char *buf;
unsigned int len;
{
  uint32 h;

  h = 5381;
  while (len) {
    --len;
    h += (h << 5);
    h ^= (uint32) *buf++;
  }
  return h;
}

Generated by  Doxygen 1.6.0   Back to index