Mixe for Privacy and Anonymity in the Internet
Public Member Functions | Private Attributes
CAPriceInfo Class Reference

CAXMLPriceCertificate uses an array of CAPriceInfo as a "poor man's hashtable" represents one PriceCertificate element as contained in a CC (Subjectkeyidentifier of a Mix plus either a PriceCert Hash (for pay Mixes) or null (for non-pay Mixes) ) More...

#include <CAPriceInfo.hpp>

List of all members.

Public Member Functions

 CAPriceInfo (UINT8 *strMixId, UINT8 *strPriceCertHash, SINT32 a_postition)
virtual ~CAPriceInfo ()
UINT8getMixId ()
UINT8getPriceCertHash ()
SINT32 getPosition ()

Private Attributes

UINT8m_pStrMixId
UINT8m_pStrPriceCertHash
SINT32 m_postition

Detailed Description

CAXMLPriceCertificate uses an array of CAPriceInfo as a "poor man's hashtable" represents one PriceCertificate element as contained in a CC (Subjectkeyidentifier of a Mix plus either a PriceCert Hash (for pay Mixes) or null (for non-pay Mixes) )

Author:
Elmar Schraml

Definition at line 41 of file CAPriceInfo.hpp.


Constructor & Destructor Documentation

CAPriceInfo::CAPriceInfo ( UINT8 strMixId,
UINT8 strPriceCertHash,
SINT32  a_postition 
)

Definition at line 34 of file CAPriceInfo.cpp.

References m_postition, m_pStrMixId, and m_pStrPriceCertHash.

{
  m_pStrMixId = strMixId;
  m_pStrPriceCertHash = strPriceCertHash; 
  m_postition = a_postition;
}

Definition at line 42 of file CAPriceInfo.cpp.

References m_pStrMixId, and m_pStrPriceCertHash.

{
  delete[] m_pStrMixId;
  m_pStrMixId = NULL;
  delete[] m_pStrPriceCertHash;
  m_pStrPriceCertHash = NULL;
}

Member Function Documentation

Definition at line 48 of file CAPriceInfo.hpp.

References m_pStrMixId.

Referenced by CAXMLCostConfirmation::getMixId().

  {
    UINT8* pTmpStr = NULL;
    if(m_pStrMixId!=NULL)
      {
        int hlen = strlen((char*)m_pStrMixId)+1;
        pTmpStr = new UINT8[hlen];
        memset(pTmpStr, 0, (hlen*sizeof(UINT8)) );
        strncpy( (char*)pTmpStr, (char*)m_pStrMixId, (hlen-1));
      }
    return pTmpStr;
  }

Definition at line 74 of file CAPriceInfo.hpp.

References m_postition.

Referenced by CAXMLCostConfirmation::getPosition().

  {
    return m_postition;
  }

Definition at line 61 of file CAPriceInfo.hpp.

References m_pStrPriceCertHash.

Referenced by CAXMLCostConfirmation::getPriceCertHash().

  {
    UINT8* pTmpStr = NULL;
    if(m_pStrPriceCertHash!=NULL)
      {
        int hlen = strlen((char*)m_pStrPriceCertHash)+1;
        pTmpStr = new UINT8[hlen];
        memset(pTmpStr, 0, (hlen*sizeof(UINT8)) );
        strncpy((char*)pTmpStr, (char*)m_pStrPriceCertHash, (hlen-1));
      }
    return pTmpStr;
  }

Member Data Documentation

Definition at line 83 of file CAPriceInfo.hpp.

Referenced by CAPriceInfo(), and getPosition().

Definition at line 81 of file CAPriceInfo.hpp.

Referenced by CAPriceInfo(), getMixId(), and ~CAPriceInfo().

Definition at line 82 of file CAPriceInfo.hpp.

Referenced by CAPriceInfo(), getPriceCertHash(), and ~CAPriceInfo().


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