diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-05-29 14:20:50 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-05-29 14:20:50 +0200 |
commit | 7b6e7703cdeeecae28552f589f249a6ab7f6c4d2 (patch) | |
tree | 2443c4b3f2e1cd0cb6cf5350b745b60e11eaf87f /src/srtp.h | |
parent | 1caa03670f91309e4237a37368c4df696d56a47d (diff) |
Make typedef for framelists. Add some error handling in SRTP class. Make new instance protection mechanism for SRTP. Make some error handling in lrtp public API.
Diffstat (limited to 'src/srtp.h')
-rw-r--r-- | src/srtp.h | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -30,25 +30,36 @@ #include <string> +#include "lrtp.h" #include "rtp.h" +#include "compat.h" #define MAX_KEY_LEN 64 #define MASTER_KEY_LEN 30 class SRTP { public: - SRTP(std::string key, unsigned int ssrc); + SRTP(std::string key, unsigned int ssrc) _throw(enum lrtp_status_t); ~SRTP(); - int encrypt(char *packet, size_t size); - int decrypt(char *packet, size_t size); + int encrypt(char *packet, size_t size) _throw(enum lrtp_status_t); + int decrypt(char *packet, size_t size) _throw(enum lrtp_status_t); private: + class SRTPInstance { + public: + SRTPInstance() _throw(enum lrtp_status_t); + ~SRTPInstance() _throw(enum lrtp_status_t); + }; + + SRTPInstance instance; + struct prv; struct prv *prv; - void setupKey(const std::string &key); - void setupPolicy(bool confidentiality, bool authentication); + void setupKey(const std::string &key) _throw(enum lrtp_status_t); + void setupPolicy(bool confidentiality, bool authentication) + _throw(enum lrtp_status_t); }; #endif/*__LRTP_SRTP_H__*/ |