~drizzle-pbxt/drizzle/drizzle-pbxt-2

« back to all changes in this revision

Viewing changes to drizzled/hash/crc32.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-11-11 01:26:04 UTC
  • mfrom: (1014.3.194 staging)
  • Revision ID: osullivan.padraig@gmail.com-20091111012604-p339jz8jeqtk4ot4
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 */
33
33
 
34
34
#include "drizzled/global.h"
35
 
#include "drizzled/crc32.h"
 
35
#include "drizzled/hash/crc32.h"
 
36
 
 
37
namespace drizzled
 
38
{
 
39
namespace hash
 
40
{
36
41
 
37
42
static const uint32_t crc32tab[256] = {
38
43
  0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
101
106
  0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d,
102
107
};
103
108
 
104
 
uint32_t hash_crc32(const char *key, size_t key_length)
 
109
uint32_t crc32(const char *key, size_t key_length)
105
110
{
106
111
  uint64_t x;
107
112
  uint32_t crc= UINT32_MAX;
111
116
 
112
117
  return ~crc;
113
118
}
 
119
 
 
120
} /* namespace hash */
 
121
} /* namespace drizzled */