|
Mixe for Privacy and Anonymity in the Internet
|
00001 #ifndef __CAPRICEINFO__ 00002 #define __CAPRICEINFO__ 00003 /* 00004 Copyright (c) 2000, The JAP-Team 00005 All rights reserved. 00006 Redistribution and use in source and binary forms, with or without modification, 00007 are permitted provided that the following conditions are met: 00008 00009 - Redistributions of source code must retain the above copyright notice, 00010 this list of conditions and the following disclaimer. 00011 00012 - Redistributions in binary form must reproduce the above copyright notice, 00013 this list of conditions and the following disclaimer in the documentation and/or 00014 other materials provided with the distribution. 00015 00016 - Neither the name of the University of Technology Dresden, Germany nor the names of its contributors 00017 may be used to endorse or promote products derived from this software without specific 00018 prior written permission. 00019 00020 00021 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS 00022 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 00023 AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS 00024 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00025 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 00026 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 00027 IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00028 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 00029 */ 00030 00039 #ifdef PAYMENT 00040 #include "StdAfx.h" 00041 class CAPriceInfo 00042 { 00043 public: 00044 CAPriceInfo(UINT8* strMixId, UINT8* strPriceCertHash, SINT32 a_postition); 00045 00046 virtual ~CAPriceInfo(); 00047 00048 UINT8* getMixId() 00049 { 00050 UINT8* pTmpStr = NULL; 00051 if(m_pStrMixId!=NULL) 00052 { 00053 int hlen = strlen((char*)m_pStrMixId)+1; 00054 pTmpStr = new UINT8[hlen]; 00055 memset(pTmpStr, 0, (hlen*sizeof(UINT8)) ); 00056 strncpy( (char*)pTmpStr, (char*)m_pStrMixId, (hlen-1)); 00057 } 00058 return pTmpStr; 00059 } 00060 00061 UINT8* getPriceCertHash() 00062 { 00063 UINT8* pTmpStr = NULL; 00064 if(m_pStrPriceCertHash!=NULL) 00065 { 00066 int hlen = strlen((char*)m_pStrPriceCertHash)+1; 00067 pTmpStr = new UINT8[hlen]; 00068 memset(pTmpStr, 0, (hlen*sizeof(UINT8)) ); 00069 strncpy((char*)pTmpStr, (char*)m_pStrPriceCertHash, (hlen-1)); 00070 } 00071 return pTmpStr; 00072 } 00073 00074 SINT32 getPosition() 00075 { 00076 return m_postition; 00077 } 00078 00079 private: 00080 00081 UINT8* m_pStrMixId; //SubjectKeyIdentifier of the Mix 00082 UINT8* m_pStrPriceCertHash; 00083 SINT32 m_postition; 00084 }; 00085 #endif //PAYMENT 00086 #endif /*CAPRICEINFO_H_*/
1.7.6.1