• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

HashFNV.h

Go to the documentation of this file.
00001 /** @file
00002 
00003   @section license License
00004 
00005   Licensed to the Apache Software Foundation (ASF) under one
00006   or more contributor license agreements.  See the NOTICE file
00007   distributed with this work for additional information
00008   regarding copyright ownership.  The ASF licenses this file
00009   to you under the Apache License, Version 2.0 (the
00010   "License"); you may not use this file except in compliance
00011   with the License.  You may obtain a copy of the License at
00012 
00013       http://www.apache.org/licenses/LICENSE-2.0
00014 
00015   Unless required by applicable law or agreed to in writing, software
00016   distributed under the License is distributed on an "AS IS" BASIS,
00017   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00018   See the License for the specific language governing permissions and
00019   limitations under the License.
00020  */
00021 
00022 /*
00023   http://www.isthe.com/chongo/tech/comp/fnv/
00024 
00025   Currently implemented FNV-1a 32bit and FNV-1a 64bit
00026  */
00027 
00028 #ifndef __HASH_FNV_H__
00029 #define __HASH_FNV_H__
00030 
00031 #include "Hash.h"
00032 #include <stdint.h>
00033 
00034 struct ATSHash32FNV1a:ATSHash32
00035 {
00036   ATSHash32FNV1a(void);
00037   void update(const void *data, size_t len);
00038   void final(void);
00039   uint32_t get(void) const;
00040   void clear(void);
00041 
00042 private:
00043     uint32_t hval;
00044 };
00045 
00046 struct ATSHash64FNV1a:ATSHash64
00047 {
00048   ATSHash64FNV1a(void);
00049   void update(const void *data, size_t len);
00050   void final(void);
00051   uint64_t get(void) const;
00052   void clear(void);
00053 
00054 private:
00055     uint64_t hval;
00056 };
00057 
00058 #endif

Generated by  doxygen 1.7.1