src/net/java/sip/communicator/impl/gui/main/call/CallInfoFrame.java
/**
     * Appends to the string buffer the stream encryption method (null, MIKEY,
     * SDES, ZRTP) used for a given media stream (type AUDIO or VIDEO).
     *
     * @param stringBuffer The string buffer containing the call information
     * statistics.
     * @param callPeerMediaHandler The media handler containing the different
     * media streams.
     * @param mediaStream the <tt>MediaStream</tt> that gives us access to
     * audio/video info.
     * @param mediaType The media type used to determine which stream of the
     * media handler must returns it encryption method.
     */
Appends to the string buffer the stream encryption method (null, MIKEY,
SDES, ZRTP) used for a given media stream (type AUDIO or VIDEO).

@param stringBuffer The string buffer containing the call information
statistics.
@param callPeerMediaHandler The media handler containing the different
media streams.
@param mediaStream the MediaStream that gives us access to
audio/video info.
@param mediaType The media type used to determine which stream of the
media handler must returns it encryption method.
Appends to the string buffer the stream encryption method ( null MIKEY SDES ZRTP ) used for a given media stream ( type AUDIO or VIDEO ) . @param stringBuffer The string buffer containing the call information statistics . @param callPeerMediaHandler The media handler containing the different media streams . @param mediaStream the MediaStream that gives us access to audio / video info . @param mediaType The media type used to determine which stream of the media handler must returns it encryption method .
private void appendStreamEncryptionMethod(
            StringBuffer stringBuffer,
            CallPeerMediaHandler<?> callPeerMediaHandler,
            MediaStream mediaStream,
            MediaType mediaType)
    {
        String transportProtocolString = "";
        StreamConnector.Protocol transportProtocol =
            mediaStream.getTransportProtocol();
        if(transportProtocol != null)
        {
            transportProtocolString = transportProtocol.toString();
        }
        String rtpType;
        SrtpControl srtpControl
            = callPeerMediaHandler.getEncryptionMethod(mediaType);
        if(srtpControl != null)
        {
            String info;
            if (srtpControl instanceof ZrtpControl)
            {
                info = "ZRTP " + ((ZrtpControl)srtpControl).getCipherString();
            }
            else
            {
                info = srtpControl.getSrtpControlType().toString();
            }
            rtpType = resources.getI18NString(
                "service.gui.callinfo.MEDIA_STREAM_SRTP")
                + " ("
                + resources.getI18NString(
                    "service.gui.callinfo.KEY_EXCHANGE_PROTOCOL")
                + ": "
                + info
                + ")";
        }
        else
        {
            rtpType = resources.getI18NString(
                            "service.gui.callinfo.MEDIA_STREAM_RTP");
        }
        stringBuffer.append(getLineString(
                    resources.getI18NString(
                        "service.gui.callinfo.MEDIA_STREAM_TRANSPORT_PROTOCOL"),
                    transportProtocolString + " / " + rtpType));
    }
private void appendStreamEncryptionMethod ( StringBuffer stringBuffer , CallPeerMediaHandler < ? > callPeerMediaHandler , MediaStream mediaStream , MediaType mediaType ) { String transportProtocolString = "" ; StreamConnector . Protocol transportProtocol = mediaStream . getTransportProtocol ( ) ; if ( transportProtocol != null ) { transportProtocolString = transportProtocol . toString ( ) ; } String rtpType ; SrtpControl srtpControl = callPeerMediaHandler . getEncryptionMethod ( mediaType ) ; if ( srtpControl != null ) { String info ; if ( srtpControl instanceof ZrtpControl ) { info = "ZRTP " + ( ( ZrtpControl ) srtpControl ) . getCipherString ( ) ; } else { info = srtpControl . getSrtpControlType ( ) . toString ( ) ; } rtpType = resources . getI18NString ( "service.gui.callinfo.MEDIA_STREAM_SRTP" ) + " (" + resources . getI18NString ( "service.gui.callinfo.KEY_EXCHANGE_PROTOCOL" ) + ": " + info + ")" ; } else { rtpType = resources . getI18NString ( "service.gui.callinfo.MEDIA_STREAM_RTP" ) ; } stringBuffer . append ( getLineString ( resources . getI18NString ( "service.gui.callinfo.MEDIA_STREAM_TRANSPORT_PROTOCOL" ) , transportProtocolString + " / " + rtpType ) ) ; }
Appends to the string buffer the stream encryption method (null, MIKEY,
 SDES, ZRTP) used for a given media stream (type AUDIO or VIDEO).
Appends to the string buffer the stream encryption method ( null MIKEY SDES ZRTP ) used for a given media stream ( type AUDIO or VIDEO ) .
// If the stream is secured. // If the stream is not secured. // Appends the encryption status String.