Page Speed Optimization Libraries
1.13.35.1
|
Public Member Functions | |
Hasher (int max_chars) | |
GoogleString | Hash (const StringPiece &content) const |
int | HashSizeInChars () const |
uint64 | HashToUint64 (const StringPiece &content) const |
Uses first 64-bits of hash to make a uint64 version of hash. | |
virtual GoogleString | RawHash (const StringPiece &content) const =0 |
virtual int | RawHashSizeInBytes () const =0 |
The number of bytes RawHash will produce. | |
|
explicit |
The passed in max_chars will be used to limit the length of Hash() and HashSizeInChars()
GoogleString net_instaweb::Hasher::Hash | ( | const StringPiece & | content | ) | const |
Computes a web64-encoded hash of a single string. This operation is thread-safe.
This is implemented in terms of RawHash, and honors the length limit passed in to the constructor.
int net_instaweb::Hasher::HashSizeInChars | ( | ) | const |
Return string length of hashes produced by this hasher's Hash method.
This is implemented in terms of RawHashSizeInBytes() and the length limit passed in to the constructor.
|
pure virtual |
Computes a binary hash of the given content. The returned value is not printable as it is the direct binary encoding of the hash. This operation is thread-safe.
Implemented in net_instaweb::MockHasher, and net_instaweb::MD5Hasher.