Class ZrtpControlImpl

    • Constructor Detail

      • ZrtpControlImpl

        public ZrtpControlImpl()
        Creates the control.
    • Method Detail

      • getCipherString

        public String getCipherString()
        Description copied from interface: ZrtpControl
        Gets the cipher information for the current media stream.
        Specified by:
        getCipherString in interface ZrtpControl
        Returns:
        the cipher information string.
      • getCurrentProtocolVersion

        public int getCurrentProtocolVersion()
        Get negotiated ZRTP protocol version.
        Specified by:
        getCurrentProtocolVersion in interface ZrtpControl
        Returns:
        the integer representation of the negotiated ZRTP protocol version.
      • getHelloHash

        public String getHelloHash​(int index)
        Return the zrtp hello hash String.
        Specified by:
        getHelloHash in interface ZrtpControl
        Parameters:
        index - Hello hash of the Hello packet identfied by index. Index must be 0 <= index < SUPPORTED_ZRTP_VERSIONS.
        Returns:
        String the zrtp hello hash.
      • getHelloHashSep

        public String[] getHelloHashSep​(int index)
        Get the ZRTP Hello Hash data - separate strings.
        Specified by:
        getHelloHashSep in interface ZrtpControl
        Parameters:
        index - Hello hash of the Hello packet identfied by index. Index must be 0 <= index < SUPPORTED_ZRTP_VERSIONS.
        Returns:
        String array containing the version string at offset 0, the Hello hash value as hex-digits at offset 1. Hello hash is available immediately after class instantiation. Returns null if ZRTP is not available.
      • getNumberSupportedVersions

        public int getNumberSupportedVersions()
        Get number of supported ZRTP protocol versions.
        Specified by:
        getNumberSupportedVersions in interface ZrtpControl
        Returns:
        the number of supported ZRTP protocol versions.
      • getPeerHelloHash

        public String getPeerHelloHash()
        Get the peer's Hello Hash data. Use this method to get the peer's Hello Hash data. The method returns the data as a string.
        Specified by:
        getPeerHelloHash in interface ZrtpControl
        Returns:
        a String containing the Hello hash value as hex-digits. Peer Hello hash is available after we received a Hello packet from our peer. If peer's hello hash is not available return null.
      • getPeerZid

        public byte[] getPeerZid()
        Description copied from interface: ZrtpControl
        Gets other party's ZID (ZRTP Identifier) data that was received during ZRTP processing. The ZID data can be retrieved after ZRTP receives the first Hello packet from the other party.
        Specified by:
        getPeerZid in interface ZrtpControl
        Returns:
        the ZID data as a byte array.
      • getPeerZidString

        public String getPeerZidString()
        Description copied from interface: ZrtpControl
        Gets other party's ZID (ZRTP Identifier) data that was received during ZRTP processing as a String. The ZID data can be retrieved after ZRTP receives the first Hello packet from the other party.
        Specified by:
        getPeerZidString in interface ZrtpControl
        Returns:
        the ZID data as a String.
      • getSecureCommunicationStatus

        public boolean getSecureCommunicationStatus()
        Method for getting the default secure status value for communication
        Specified by:
        getSecureCommunicationStatus in interface SrtpControl
        Returns:
        the default enabled/disabled status value for secure communication
      • getSecurityString

        public String getSecurityString()
        Description copied from interface: ZrtpControl
        Gets the SAS for the current media stream.
        Specified by:
        getSecurityString in interface ZrtpControl
        Returns:
        the four character ZRTP SAS.
      • getTimeoutValue

        public long getTimeoutValue()
        Returns the timeout value that will we will wait and fire timeout secure event if call is not secured. The value is in milliseconds.
        Specified by:
        getTimeoutValue in interface ZrtpControl
        Returns:
        the timeout value that will we will wait and fire timeout secure event if call is not secured.
      • isSecurityVerified

        public boolean isSecurityVerified()
        Description copied from interface: ZrtpControl
        Gets the status of the SAS verification.
        Specified by:
        isSecurityVerified in interface ZrtpControl
        Returns:
        true when the SAS has been verified.
      • requiresSecureSignalingTransport

        public boolean requiresSecureSignalingTransport()
        Returns false, ZRTP exchanges its keys over the media path.
        Specified by:
        requiresSecureSignalingTransport in interface SrtpControl
        Returns:
        false
      • setConnector

        public void setConnector​(AbstractRTPConnector connector)
        Sets the RTPConnector which is to use or uses this ZRTP engine.
        Specified by:
        setConnector in interface SrtpControl
        Parameters:
        connector - the RTPConnector which is to use or uses this ZRTP engine
      • setMultistream

        public void setMultistream​(SrtpControl master)
        Start multi-stream ZRTP sessions. After the ZRTP Master (DH) session reached secure state the SCCallback calls this method to start the multi-stream ZRTP sessions. Enable auto-start mode (auto-sensing) to the engine.
        Specified by:
        setMultistream in interface SrtpControl
        Overrides:
        setMultistream in class AbstractSrtpControl<ZRTPTransformEngine>
        Parameters:
        master - master SRTP data
      • setSASVerification

        public void setSASVerification​(boolean verified)
        Sets the SAS verification
        Specified by:
        setSASVerification in interface ZrtpControl
        Parameters:
        verified - the new SAS verification status
      • start

        public void start​(org.jitsi.utils.MediaType mediaType)
        Starts and enables zrtp in the stream holding this control.
        Specified by:
        start in interface SrtpControl
        Parameters:
        mediaType - the media type of the stream this control controls.