00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef MCCSRTPMASTERKEY_H
00022 #define MCCSRTPMASTERKEY_H
00023
00024 #include <e32base.h>
00025
00026
00027
00028 const TUint KMasterKeyMaxLength = 16;
00029
00030
00031
00032
00033 const TUint KMccSRTPDefSessionEncryptionKeyLength = 0x80;
00034
00035
00036
00037 const TUint KMccSRTPDefSessionAuthenticationKeyLength = 0xa0;
00038
00039
00040
00041
00042 const TUint16 KMccSRTPDefaultMasterKeyLength = 0x80;
00043
00044
00045
00046 const TUint KMKIMaxLength = 128;
00047
00054 class TMccSrtpMasterKey
00055 {
00056 public:
00057
00058 inline TMccSrtpMasterKey( const TDesC8& aMasterKey,
00059 const TDesC8& aMKI,
00060 TUint aEncKeyBitLength =
00061 KMccSRTPDefSessionEncryptionKeyLength,
00062 TUint aAuthKeyBitLength =
00063 KMccSRTPDefSessionAuthenticationKeyLength ) :
00064 iMasterKey( aMasterKey ),
00065 iMKI( aMKI ),
00066 iEncKeyBitLength( aEncKeyBitLength ),
00067 iAuthKeyBitLength( aAuthKeyBitLength )
00068 {
00069 };
00070
00071 private:
00072
00073 TMccSrtpMasterKey() :
00074 iMasterKey( KNullDesC8 ),
00075 iMKI( KNullDesC8 ),
00076 iEncKeyBitLength( KMccSRTPDefSessionEncryptionKeyLength ),
00077 iAuthKeyBitLength( KMccSRTPDefSessionAuthenticationKeyLength )
00078 {
00079 };
00080
00081 public:
00082
00086 TBuf8< KMasterKeyMaxLength > iMasterKey;
00087
00091 TBuf8< KMKIMaxLength > iMKI;
00092
00096 TUint iEncKeyBitLength;
00097
00101 TUint iAuthKeyBitLength;
00102
00103 };
00104
00105 typedef TPckgBuf<TMccSrtpMasterKey> TMccSrtpMasterKeyPckg;
00106
00107 #endif