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

Method getCipherAlgorithm

src/jlsrtp.cpp:1687–1723  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1685}
1686
1687CipherType JLSRTP::getCipherAlgorithm(ActiveCrypto crypto_attrib /*= ACTIVE_CRYPTO*/)
1688{
1689 CipherType retVal = INVALID_CIPHER;
1690 ActiveCrypto active_crypto = INVALID_CRYPTO;
1691
1692 if (crypto_attrib == ACTIVE_CRYPTO)
1693 {
1694 active_crypto = _active_crypto;
1695 }
1696 else
1697 {
1698 active_crypto = crypto_attrib;
1699 }
1700
1701 switch (active_crypto)
1702 {
1703 case PRIMARY_CRYPTO:
1704 {
1705 retVal = _primary_crypto.cipher_algorithm;
1706 }
1707 break;
1708
1709 case SECONDARY_CRYPTO:
1710 {
1711 retVal = _secondary_crypto.cipher_algorithm;
1712 }
1713 break;
1714
1715 default:
1716 {
1717 retVal = INVALID_CIPHER;
1718 }
1719 break;
1720 }
1721
1722 return retVal;
1723}
1724
1725int JLSRTP::selectCipherAlgorithm(CipherType cipherType, ActiveCrypto crypto_attrib /*= ACTIVE_CRYPTO*/)
1726{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected