|
Mixe for Privacy and Anonymity in the Internet
|
00001 #ifndef __CA_DATA_RETENTION_LOG_FILE 00002 #define __CA_DATA_RETENTION_LOG_FILE 00003 #include "CAASymCipher.hpp" 00004 00005 struct __t__data_retention_log_file_header 00006 { 00007 UINT8 version; 00008 UINT8 reserved[3]; 00009 00010 UINT8 day; 00011 UINT8 month; 00012 UINT16 year; 00013 00014 UINT8 entity; 00015 UINT8 loggedFields; 00016 UINT8 entriesPerBlock; 00017 UINT8 keys; 00018 }; 00019 00020 typedef struct __t__data_retention_log_file_header t_dataretentionLogFileHeader; 00021 00022 const UINT8 DATARETENTION_ENTITY_FIRST_MIX=1; 00023 const UINT8 DATARETENTION_ENTITY_MIDDLE_MIX=2; 00024 const UINT8 DATARETENTION_ENTITY_LAST_MIX=3; 00025 00026 class CADataRetentionLogFile 00027 { 00028 public: 00029 CADataRetentionLogFile(); 00030 ~CADataRetentionLogFile(); 00031 SINT32 openLog(UINT8* strLogDir,UINT32 date,CAASymCipher* pPublicKey); 00032 SINT32 closeLog(); 00033 SINT32 log(t_dataretentionLogEntry*); 00034 UINT32 getMaxLogTime() 00035 { 00036 return m_nMaxLogTime; 00037 }; 00038 00039 static SINT32 doCheckAndPerformanceTest(); 00040 private: 00041 SINT32 writeHeader(CAASymCipher* pPublicKey); 00042 SINT32 flushLogEntries(); 00043 SINT32 writeFooter(); 00044 00045 gcm_ctx_64k* m_pGCMCtx; 00046 00047 int m_hLogFile; 00048 UINT8 m_Day; 00049 UINT8 m_Month; 00050 UINT16 m_Year; 00051 UINT8* m_arOneBlock; 00052 UINT8* m_encBlock; 00053 UINT8* m_nonceBuffForLogEntries; 00054 UINT32 m_nLogEntriesPerBlock; 00055 UINT32 m_nBytesPerLogEntry; 00056 UINT32 m_nCurrentLogEntriesInBlock; 00057 UINT32 m_nCurrentBlockNumber; 00058 UINT32 m_nMaxLogTime; 00059 00060 }; 00061 00062 #endif //__CA_DATA_RETENTION_LOG_FILE
1.7.6.1