Page Speed Optimization Libraries  1.4.26.1
net/instaweb/util/public/md5_hasher.h
Go to the documentation of this file.
00001 // Copyright 2010 Google Inc.
00017 
00018 #ifndef NET_INSTAWEB_UTIL_PUBLIC_MD5_HASHER_H_
00019 #define NET_INSTAWEB_UTIL_PUBLIC_MD5_HASHER_H_
00020 
00021 #include "net/instaweb/util/public/basictypes.h"
00022 #include "net/instaweb/util/public/hasher.h"
00023 #include "net/instaweb/util/public/string.h"
00024 #include "net/instaweb/util/public/string_util.h"
00025 
00026 namespace net_instaweb {
00027 
00028 class MD5Hasher : public Hasher {
00029  public:
00030   static const int kDefaultHashSize = 10;
00031 
00032   MD5Hasher() : Hasher(kDefaultHashSize) {}
00033   explicit MD5Hasher(int hash_size) : Hasher(hash_size) { }
00034   virtual ~MD5Hasher();
00035 
00036   virtual GoogleString RawHash(const StringPiece& content) const;
00037   virtual int RawHashSizeInBytes() const;
00038 
00039  private:
00040   DISALLOW_COPY_AND_ASSIGN(MD5Hasher);
00041 };
00042 
00043 }  
00044 
00045 #endif  ///< NET_INSTAWEB_UTIL_PUBLIC_MD5_HASHER_H_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines