src/net/java/sip/communicator/impl/protocol/jabber/CallPeerMediaHandlerJabberImpl.java
/**
     * Returns the selected SDES crypto suite selected.
     *
     * @param isInitiator True if the local call instance is the initiator of
     * the call. False otherwise.
     * @param sDesControl The SDES based SRTP MediaStream encryption
     * control.
     * @param encryptionPacketExtension The ENCRYPTION element received from the
     * remote peer. This may contain the SDES crypto suites available for the
     * remote peer.
     *
     * @return The selected SDES crypto suite supported by both the local and
     * the remote peer. Or null, if there is no crypto suite supported by both
     * of the peers.
     */
Returns the selected SDES crypto suite selected.
@param isInitiator True if the local call instance is the initiator of
the call. False otherwise.
@param sDesControl The SDES based SRTP MediaStream encryption
control.
@param encryptionPacketExtension The ENCRYPTION element received from the
remote peer. This may contain the SDES crypto suites available for the
remote peer.

@return The selected SDES crypto suite supported by both the local and
the remote peer. Or null, if there is no crypto suite supported by both
of the peers.
Returns the selected SDES crypto suite selected . @param isInitiator True if the local call instance is the initiator of the call . False otherwise . @param sDesControl The SDES based SRTP MediaStream encryption control . @param encryptionPacketExtension The ENCRYPTION element received from the remote peer . This may contain the SDES crypto suites available for the remote peer . @return The selected SDES crypto suite supported by both the local and the remote peer . Or null if there is no crypto suite supported by both of the peers .
private SrtpCryptoAttribute selectSdesCryptoSuite(
        boolean isInitiator,
        SDesControl sDesControl,
        EncryptionPacketExtension encryptionPacketExtension)
    {
        List<CryptoPacketExtension> cryptoPacketExtensions
            = encryptionPacketExtension.getCryptoList();
        List<SrtpCryptoAttribute> peerAttributes
            = new ArrayList<>(cryptoPacketExtensions.size());
        for (CryptoPacketExtension cpe : cryptoPacketExtensions)
            peerAttributes.add(
                SrtpCryptoAttribute.create(
                    cpe.getTag(),
                    cpe.getCryptoSuite(),
                    cpe.getKeyParams(),
                    cpe.getSessionParams()));
        return
            isInitiator
                ? sDesControl.initiatorSelectAttribute(peerAttributes)
                : sDesControl.responderSelectAttribute(peerAttributes);
    }
private SrtpCryptoAttribute selectSdesCryptoSuite ( boolean isInitiator , SDesControl sDesControl , EncryptionPacketExtension encryptionPacketExtension ) { List < CryptoPacketExtension > cryptoPacketExtensions = encryptionPacketExtension . getCryptoList ( ) ; List < SrtpCryptoAttribute > peerAttributes = new ArrayList < > ( cryptoPacketExtensions . size ( ) ) ; for ( CryptoPacketExtension cpe : cryptoPacketExtensions ) peerAttributes . add ( SrtpCryptoAttribute . create ( cpe . getTag ( ) , cpe . getCryptoSuite ( ) , cpe . getKeyParams ( ) , cpe . getSessionParams ( ) ) ) ; return isInitiator ? sDesControl . initiatorSelectAttribute ( peerAttributes ) : sDesControl . responderSelectAttribute ( peerAttributes ) ; }
Returns the selected SDES crypto suite selected.
Returns the selected SDES crypto suite selected .