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

Method getHashAlgorithm

src/jlsrtp.cpp:1805–1841  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1803}
1804
1805HashType JLSRTP::getHashAlgorithm(ActiveCrypto crypto_attrib /*= ACTIVE_CRYPTO*/)
1806{
1807 HashType retVal = INVALID_HASH;
1808 ActiveCrypto active_crypto = INVALID_CRYPTO;
1809
1810 if (crypto_attrib == ACTIVE_CRYPTO)
1811 {
1812 active_crypto = _active_crypto;
1813 }
1814 else
1815 {
1816 active_crypto = crypto_attrib;
1817 }
1818
1819 switch (active_crypto)
1820 {
1821 case PRIMARY_CRYPTO:
1822 {
1823 retVal = _primary_crypto.hmac_algorithm;
1824 }
1825 break;
1826
1827 case SECONDARY_CRYPTO:
1828 {
1829 retVal = _secondary_crypto.hmac_algorithm;
1830 }
1831 break;
1832
1833 default:
1834 {
1835 retVal = INVALID_HASH;
1836 }
1837 break;
1838 }
1839
1840 return retVal;
1841}
1842
1843int JLSRTP::selectHashAlgorithm(HashType hashType, ActiveCrypto crypto_attrib /*= ACTIVE_CRYPTO*/)
1844{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected