21 #ifndef CRYPTOCONTEXT_H
22 #define CRYPTOCONTEXT_H
24 #include <cc++/config.h>
29 #include <ccrtp/crypto/AesSrtp.h>
32 #define REPLAY_WINDOW_SIZE 64
42 #ifdef CCXX_NAMESPACES
168 int32 masterKeyLength,
170 int32 masterSaltLength,
223 void srtpEncrypt(
RTPPacket* rtp, uint64 index, uint32 ssrc );
241 void srtpAuthenticate(
RTPPacket* rtp, uint32 roc, uint8* tag );
254 void deriveSrtpKeys(uint64 index);
268 uint64 guessIndex(uint16 newSeqNumber);
285 bool checkReplay(uint16 newSeqNumber);
296 void update( uint16 newSeqNumber );
348 CryptoContext* newCryptoContextForSSRC(uint32 ssrc,
int roc, int64 keyDerivRate);
390 AesSrtp* f8AesCipher;
397 #ifdef CCXX_NAMESPACES
A base class for both IncomingRTPPkt and OutgoingRTPPkt.
int32 getMkiLength() const
Get the length of the MKI in bytes.
The implementation for a SRTP cryptographic context.
void setRoc(uint32 r)
Set the Roll-Over-Counter.
uint32 master_key_srtcp_use_nb
const int SrtpEncryptionAESF8
uint32 getRoc() const
Get the Roll-Over-Counter.
uint32 master_salt_length
const int SrtpEncryptionNull
int32 getTagLength() const
Get the length of the SRTP authentication tag in bytes.
const int SrtpAuthenticationSha1Hmac
uint32 getSsrc() const
Get the SSRC of this SRTP Cryptograhic context.
const int SrtpAuthenticationNull
uint32 master_key_srtp_use_nb
const int SrtpEncryptionAESCM