scire
Sadh's C++ Impromptu Routines Ensemble
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
scire::Hash Class Reference

static utility routines for hash algorithms More...

#include <hash_comn.hpp>

Public Types

enum  { BlockSz = 2048 }
 

Static Public Member Functions

template<typename SzT , typename U32 , typename B8 , typename SB8 >
static void Compute (IHashAlgo< SzT, U32, B8, SB8 > &iHA, std::string message)
 Compute hash of msg using passed algo. More...
 
template<typename SzT , typename U32 , typename B8 , typename SB8 >
static bool Compute (IHashAlgo< SzT, U32, B8, SB8 > &iHA, std::ifstream &ifs)
 Compute hash of file using passed algo. More...
 
template<typename SzT , typename U32 , typename B8 , typename SB8 >
static bool ComputeFile (IHashAlgo< SzT, U32, B8, SB8 > &iHA, std::string filepath)
 Compute hash of file using passed algo. More...
 
template<typename SzT , typename U32 , typename B8 , typename SB8 >
static bool ComputeFile (IHashAlgo< SzT, U32, B8, SB8 > &iHA, char *filepath)
 

Detailed Description

static utility routines for hash algorithms

Definition at line 80 of file hash_comn.hpp.

Member Enumeration Documentation

anonymous enum
Enumerator
BlockSz 

Definition at line 98 of file hash_comn.hpp.

Member Function Documentation

template<typename SzT , typename U32 , typename B8 , typename SB8 >
static void scire::Hash::Compute ( IHashAlgo< SzT, U32, B8, SB8 > &  iHA,
std::string  message 
)
inlinestatic

Compute hash of msg using passed algo.

Digest is to be stored in hash object. This routine inits hash object and then invokes Update and Final

Parameters
iHAalgo to compute with
messagemessage string to compute hash for

Definition at line 88 of file hash_comn.hpp.

template<typename SzT , typename U32 , typename B8 , typename SB8 >
static bool scire::Hash::Compute ( IHashAlgo< SzT, U32, B8, SB8 > &  iHA,
std::ifstream &  ifs 
)
inlinestatic

Compute hash of file using passed algo.

Digest is to be stored in hash object. This routine inits hash object and then invokes Update and Final

Parameters
iHAalgo to compute with
ifsstd::ifstream object to compute hash for

Definition at line 105 of file hash_comn.hpp.

template<typename SzT , typename U32 , typename B8 , typename SB8 >
static bool scire::Hash::ComputeFile ( IHashAlgo< SzT, U32, B8, SB8 > &  iHA,
std::string  filepath 
)
inlinestatic

Compute hash of file using passed algo.

Digest is to be stored in hash object. This routine inits hash object and then invokes Update and Final

Parameters
iHAalgo to compute with
filepathpath to file to compute hash for

Definition at line 148 of file hash_comn.hpp.

template<typename SzT , typename U32 , typename B8 , typename SB8 >
static bool scire::Hash::ComputeFile ( IHashAlgo< SzT, U32, B8, SB8 > &  iHA,
char *  filepath 
)
inlinestatic

Parameters
iHAalgo to compute with
filepathpath to file to compute hash for

Definition at line 161 of file hash_comn.hpp.


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