MCPcopy Create free account
hub / github.com/SIPp/sipp / setMasterKey

Method setMasterKey

src/jlsrtp.cpp:3218–3256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3216}
3217
3218int JLSRTP::setMasterKey(std::vector<unsigned char> &key, ActiveCrypto crypto_attrib /*= ACTIVE_CRYPTO*/)
3219{
3220 int retVal = -1;
3221 ActiveCrypto active_crypto = INVALID_CRYPTO;
3222
3223 if (crypto_attrib == ACTIVE_CRYPTO)
3224 {
3225 active_crypto = _active_crypto;
3226 }
3227 else
3228 {
3229 active_crypto = crypto_attrib;
3230 }
3231
3232 switch (active_crypto)
3233 {
3234 case PRIMARY_CRYPTO:
3235 {
3236 _primary_crypto.master_key = key;
3237 retVal = 0;
3238 }
3239 break;
3240
3241 case SECONDARY_CRYPTO:
3242 {
3243 _secondary_crypto.master_key = key;
3244 retVal = 0;
3245 }
3246 break;
3247
3248 default:
3249 {
3250 retVal = -1;
3251 }
3252 break;
3253 }
3254
3255 return retVal;
3256}
3257
3258int JLSRTP::setMasterSalt(std::vector<unsigned char> &salt, ActiveCrypto crypto_attrib /*= ACTIVE_CRYPTO*/)
3259{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected