00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _ZRTPPACKETCOMMIT_H_
00022 #define _ZRTPPACKETCOMMIT_H_
00023
00024 #include <libzrtpcpp/ZrtpPacketBase.h>
00025
00037 class ZrtpPacketCommit : public ZrtpPacketBase {
00038
00039 protected:
00040 Commit_t* commitHeader;
00041
00042 public:
00043 ZrtpPacketCommit();
00044 ZrtpPacketCommit(uint8_t* data);
00045 virtual ~ZrtpPacketCommit();
00046
00047 uint8_t* getHashType() { return commitHeader->hash; };
00048 uint8_t* getCipherType() { return commitHeader->cipher; };
00049 uint8_t* getAuthLen() { return commitHeader->authlengths; };
00050 uint8_t* getPubKeysType() { return commitHeader->pubkey; };
00051 uint8_t* getSasType() { return commitHeader->sas; };
00052 uint8_t* getZid() { return commitHeader->zid; };
00053 uint8_t* getHvi() { return commitHeader->hvi; };
00054
00055 void setHashType(uint8_t* text) { memcpy(commitHeader->hash, text, ZRTP_WORD_SIZE); };
00056 void setCipherType(uint8_t* text) { memcpy(commitHeader->cipher, text, ZRTP_WORD_SIZE); };
00057 void setAuthLen(uint8_t* text) { memcpy(commitHeader->authlengths, text, ZRTP_WORD_SIZE); };
00058 void setPubKeyType(uint8_t* text) { memcpy(commitHeader->pubkey, text, ZRTP_WORD_SIZE); };
00059 void setSasType(uint8_t* text) { memcpy(commitHeader->sas, text, ZRTP_WORD_SIZE); };
00060 void setZid(uint8_t* text) { memcpy(commitHeader->zid, text, sizeof(commitHeader->zid)); };
00061 void setHvi(uint8_t* text) { memcpy(commitHeader->hvi, text, sizeof(commitHeader->hvi)); };
00062
00063 private:
00064 CommitPacket_t data;
00065 };
00066
00067 #endif // ZRTPPACKETCOMMIT
00068