Public Types | Public Member Functions | Static Public Attributes | Protected Attributes

URLHashContext Class Reference

Crypto Hash context for URLs. More...

#include <URL.h>

Inherits ats::CryptoContext.

Collaboration diagram for URLHashContext:
Collaboration graph
[legend]

Public Types

enum  HashType { UNSPECIFIED, MD5, MMH }

Public Member Functions

 URLHashContext ()
virtual bool update (void const *data, int length)
 Update the hash with data of length bytes.
virtual bool finalize (CryptoHash &hash)
 Finalize and extract the hash.

Static Public Attributes

static HashType Setting = URLHashContext::MMH
static size_t const OBJ_SIZE = 256
 Size of storage for placement new of hashing context.

Protected Attributes

char _obj [OBJ_SIZE]
 Raw storage for instantiated context.

Detailed Description

Crypto Hash context for URLs.

Definition at line 94 of file URL.h.


Member Enumeration Documentation

Enumerator:
UNSPECIFIED 
MD5 
MMH 

Definition at line 102 of file URL.h.


Constructor & Destructor Documentation

URLHashContext::URLHashContext (  ) 

Definition at line 102 of file URL.cc.

References _obj, ink_assert, MD5, MMH, Setting, and UNSPECIFIED.


Member Function Documentation

bool URLHashContext::finalize ( CryptoHash hash  )  [inline, virtual]

Finalize and extract the hash.

Implements ats::CryptoContext.

Definition at line 116 of file URL.h.

References _obj.

bool URLHashContext::update ( void const *  data,
int  length 
) [inline, virtual]

Update the hash with data of length bytes.

Implements ats::CryptoContext.

Definition at line 112 of file URL.h.

References _obj.


Field Documentation

char URLHashContext::_obj[OBJ_SIZE] [protected]

Raw storage for instantiated context.

Definition at line 109 of file URL.h.

Referenced by finalize(), update(), and URLHashContext().

size_t const URLHashContext::OBJ_SIZE = 256 [static]

Size of storage for placement new of hashing context.

Definition at line 106 of file URL.h.

Referenced by url_init().

URLHashContext::HashType URLHashContext::Setting = URLHashContext::MMH [static]

Definition at line 103 of file URL.h.

Referenced by CB_After_Cache_Init(), and URLHashContext().


The documentation for this class was generated from the following files: