tcpflow  1.6.1
About: tcpflow is a TCP/IP packet demultiplexer that captures data transmitted as part of TCP connections (flows), and stores the data in a way that is convenient for protocol analysis and debugging.
  Fossies Dox: tcpflow-1.6.1.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

hash__< md, SIZE > Class Template Reference

#include <hash_t.h>

Public Member Functions

 hash__ ()
 
 hash__ (const uint8_t *provided)
 
const uint8_tfinal () const
 
const char * hexdigest (char *hexbuf, size_t bufsize) const
 
std::string hexdigest () const
 
bool operator< (const hash__ &s2) const
 
bool operator== (const hash__ &s2) const
 

Static Public Member Functions

static size_t size ()
 
static unsigned int hex2int (char ch)
 
static unsigned int hex2int (char ch0, char ch1)
 
static hash__ fromhex (const std::string &hexbuf)
 
static int hex2bin (uint8_t *binbuf, size_t binbuf_size, const char *hex)
 
static const hash__new_from_hex (const char *hex)
 

Public Attributes

uint8_t digest [SIZE]
 

Friends

std::ostream & operator<< (std::ostream &os, const hash__ &s2)
 

Detailed Description

template<const EVP_MD * md, size_t SIZE>
class hash__< md, SIZE >

For reasons that defy explanation (at the moment), this is required.

Definition at line 72 of file hash_t.h.

Constructor & Destructor Documentation

◆ hash__() [1/2]

template<const EVP_MD * md, size_t SIZE>
hash__< md, SIZE >::hash__ ( )
inline

Definition at line 79 of file hash_t.h.

Referenced by hash__< md, SIZE >::new_from_hex().

◆ hash__() [2/2]

template<const EVP_MD * md, size_t SIZE>
hash__< md, SIZE >::hash__ ( const uint8_t provided)
inline

Definition at line 81 of file hash_t.h.

References hash__< md, SIZE >::size().

Member Function Documentation

◆ final()

template<const EVP_MD * md, size_t SIZE>
const uint8_t* hash__< md, SIZE >::final ( ) const
inline

Definition at line 84 of file hash_t.h.

References hash__< md, SIZE >::digest.

◆ fromhex()

template<const EVP_MD * md, size_t SIZE>
static hash__ hash__< md, SIZE >::fromhex ( const std::string &  hexbuf)
inlinestatic

◆ hex2bin()

template<const EVP_MD * md, size_t SIZE>
static int hash__< md, SIZE >::hex2bin ( uint8_t binbuf,
size_t  binbuf_size,
const char *  hex 
)
inlinestatic

Convert a hex representation to binary, and return the number of bits converted.

Parameters
binbufoutput buffer
binbuf_sizesize of output buffer in bytes.
hexinput buffer (in hex)
Returns
the number of converted bits.

Definition at line 127 of file hash_t.h.

References hash__< md, SIZE >::hex2int().

Referenced by hash__< md, SIZE >::new_from_hex().

◆ hex2int() [1/2]

template<const EVP_MD * md, size_t SIZE>
static unsigned int hash__< md, SIZE >::hex2int ( char  ch)
inlinestatic

◆ hex2int() [2/2]

template<const EVP_MD * md, size_t SIZE>
static unsigned int hash__< md, SIZE >::hex2int ( char  ch0,
char  ch1 
)
inlinestatic

Definition at line 94 of file hash_t.h.

References hash__< md, SIZE >::hex2int().

◆ hexdigest() [1/2]

template<const EVP_MD * md, size_t SIZE>
std::string hash__< md, SIZE >::hexdigest ( ) const
inline

Definition at line 114 of file hash_t.h.

◆ hexdigest() [2/2]

template<const EVP_MD * md, size_t SIZE>
const char* hash__< md, SIZE >::hexdigest ( char *  hexbuf,
size_t  bufsize 
) const
inline

Definition at line 105 of file hash_t.h.

References hexbuf().

Referenced by be13::plugin::process_sbuf().

◆ new_from_hex()

template<const EVP_MD * md, size_t SIZE>
static const hash__* hash__< md, SIZE >::new_from_hex ( const char *  hex)
inlinestatic

◆ operator<()

template<const EVP_MD * md, size_t SIZE>
bool hash__< md, SIZE >::operator< ( const hash__< md, SIZE > &  s2) const
inline

Definition at line 146 of file hash_t.h.

References hash__< md, SIZE >::digest.

◆ operator==()

template<const EVP_MD * md, size_t SIZE>
bool hash__< md, SIZE >::operator== ( const hash__< md, SIZE > &  s2) const
inline

Definition at line 152 of file hash_t.h.

References hash__< md, SIZE >::digest.

◆ size()

template<const EVP_MD * md, size_t SIZE>
static size_t hash__< md, SIZE >::size ( )
inlinestatic

Definition at line 76 of file hash_t.h.

Referenced by hash__< md, SIZE >::fromhex(), and hash__< md, SIZE >::hash__().

Friends And Related Function Documentation

◆ operator<<

template<const EVP_MD * md, size_t SIZE>
std::ostream& operator<< ( std::ostream &  os,
const hash__< md, SIZE > &  s2 
)
friend

Definition at line 156 of file hash_t.h.

Member Data Documentation

◆ digest


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