CCryptoLink Class Reference

#include <CryptoLink.h>

Inheritance diagram for CCryptoLink:

CCryptoPPLink COpenSSLLink List of all members.

Public Member Functions

 CCryptoLink (void)
virtual ~CCryptoLink (void)
__int64 GetCycles ()
virtual void ProcessMACVer ()=0
virtual void ProcessMACGen ()=0
virtual void ProcessHash ()=0
virtual void ProcessHashVerify ()=0
virtual bool processVerify ()=0
virtual void processSign ()=0
virtual void processPK ()=0
virtual BOOL processRequest (DWORD numPumps, DWORD sizePumps, DWORD m_lastPump)=0
virtual string ByteToHexString (byte *out, int bytesize)=0
virtual byte * GetIV (int bytesize)=0

Static Public Member Functions

static int ntz (unsigned i)

Public Attributes

CKryptosTimer overallTimer
CKryptosTimer internalTimer
CString TimingDetails

Detailed Description

This class defines the interface that Kryptos will use for any cryptographic library. It is the parent class of COpenSSLLink and CCryptoPPLink.


Constructor & Destructor Documentation

CCryptoLink::CCryptoLink ( void   ) 

Default constructor.

CCryptoLink::~CCryptoLink ( void   )  [virtual]

Default destructor.


Member Function Documentation

__int64 CCryptoLink::GetCycles (  ) 

GetCycles was originally implemented in CCryptoPPLink, so it was moved to this class instead. It seems to be somewhat related to timing values.

Returns:
An __int64.

static int CCryptoLink::ntz ( unsigned  i  )  [inline, static]

Counts the number of trailing zeros in an integer.

Parameters:
i - an unsigned integer to count the number of trailing zeros.
Returns:
An integer representing the number of trailing zeros.

virtual void CCryptoLink::ProcessMACVer (  )  [pure virtual]

This function is called to verify MACs.

Implemented in CCryptoPPLink, and COpenSSLLink.

virtual void CCryptoLink::ProcessMACGen (  )  [pure virtual]

This function is called to generate MACs.

Implemented in CCryptoPPLink, and COpenSSLLink.

virtual void CCryptoLink::ProcessHash (  )  [pure virtual]

This function is called to generate Hashes.

Implemented in CCryptoPPLink, and COpenSSLLink.

virtual void CCryptoLink::ProcessHashVerify (  )  [pure virtual]

This function is called to verify Hashes.

Implemented in CCryptoPPLink, and COpenSSLLink.

virtual bool CCryptoLink::processVerify (  )  [pure virtual]

This function is called to verify digital signatures.

Returns:
A bool indicating the success of this operation.

Implemented in CCryptoPPLink, and COpenSSLLink.

virtual void CCryptoLink::processSign (  )  [pure virtual]

This function is called to generate digital signatures.

Implemented in CCryptoPPLink, and COpenSSLLink.

virtual void CCryptoLink::processPK (  )  [pure virtual]

This function is called to perform public key operations.

Implemented in CCryptoPPLink, and COpenSSLLink.

virtual BOOL CCryptoLink::processRequest ( DWORD  numPumps,
DWORD  sizePumps,
DWORD  m_lastPump 
) [pure virtual]

This function is called to perform symmetric key operations.

Returns:
A BOOL indicating whether this operation was successful.

Implemented in CCryptoPPLink, and COpenSSLLink.

virtual string CCryptoLink::ByteToHexString ( byte *  out,
int  bytesize 
) [pure virtual]

This function converts a series of bytes to a string of Hex digits.

Parameters:
out - the byte array to convert
bytesize - an int representing the size of the byte array
Returns:
A string of hex digits equivalent to the byte array.

Implemented in CCryptoPPLink, and COpenSSLLink.

virtual byte* CCryptoLink::GetIV ( int  bytesize  )  [pure virtual]

This functions retrieves the IV.

Parameters:
bytesize - an int indicating how long the IV should be.
Returns:
A byte array containing the IV.

Implemented in CCryptoPPLink, and COpenSSLLink.


Member Data Documentation

CKryptosTimer CCryptoLink::overallTimer

Includes I/O time

CKryptosTimer CCryptoLink::internalTimer

Includes processing time only

CString CCryptoLink::TimingDetails

Includes extra timing information


The documentation for this class was generated from the following files:
Generated on Sun Dec 17 14:54:16 2006 for Kryptos by  doxygen 1.5.1-p1