public class ZrtpControlImpl extends AbstractSrtpControl<ZRTPTransformEngine> implements ZrtpControl
Modifier and Type | Class and Description |
---|---|
static class |
ZrtpControlImpl.ZRTPCustomInfoCodes
Additional info codes for and data to support ZRTP4J.
|
SrtpControl.TransformEngine
transformEngine
RTP_SAVP, RTP_SAVPF
Constructor and Description |
---|
ZrtpControlImpl()
Creates the control.
|
Modifier and Type | Method and Description |
---|---|
protected ZRTPTransformEngine |
createTransformEngine()
Initializes a new ZRTPTransformEngine instance to be associated
with and used by this ZrtpControlImpl instance.
|
void |
doCleanup()
Prepares this
SrtpControl for garbage collection. |
java.lang.String |
getCipherString()
Gets the cipher information for the current media stream.
|
int |
getCurrentProtocolVersion()
Get negotiated ZRTP protocol version.
|
java.lang.String |
getHelloHash(int index)
Return the zrtp hello hash String.
|
java.lang.String[] |
getHelloHashSep(int index)
Get the ZRTP Hello Hash data - separate strings.
|
int |
getNumberSupportedVersions()
Get number of supported ZRTP protocol versions.
|
java.lang.String |
getPeerHelloHash()
Get the peer's Hello Hash data.
|
byte[] |
getPeerZid()
Gets other party's ZID (ZRTP Identifier) data that was received during
ZRTP processing.
|
java.lang.String |
getPeerZidString()
Gets other party's ZID (ZRTP Identifier) data that was received during
ZRTP processing as a String.
|
boolean |
getSecureCommunicationStatus()
Method for getting the default secure status value for communication
|
java.lang.String |
getSecurityString()
Gets the SAS for the current media stream.
|
long |
getTimeoutValue()
Returns the timeout value that will we will wait
and fire timeout secure event if call is not secured.
|
boolean |
isSecurityVerified()
Gets the status of the SAS verification.
|
boolean |
requiresSecureSignalingTransport()
Returns
false , ZRTP exchanges its keys over the media path. |
void |
setConnector(AbstractRTPConnector connector)
Sets the RTPConnector which is to use or uses this ZRTP engine.
|
void |
setMasterSession(boolean masterSession)
When in multistream mode, enables the master session.
|
void |
setMultistream(SrtpControl master)
Start multi-stream ZRTP sessions.
|
void |
setSASVerification(boolean verified)
Sets the SAS verification
|
void |
start(MediaType mediaType)
Starts and enables zrtp in the stream holding this control.
|
cleanup, getSrtpControlType, getSrtpListener, getTransformEngine, registerUser, setSrtpListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cleanup, getSrtpControlType, getSrtpListener, getTransformEngine, registerUser, setSrtpListener
public void doCleanup()
SrtpControl
for garbage collection.doCleanup
in class AbstractSrtpControl<ZRTPTransformEngine>
public java.lang.String getCipherString()
ZrtpControl
getCipherString
in interface ZrtpControl
public int getCurrentProtocolVersion()
getCurrentProtocolVersion
in interface ZrtpControl
public java.lang.String getHelloHash(int index)
getHelloHash
in interface ZrtpControl
index
- Hello hash of the Hello packet identfied by index. Index must
be 0 <= index < SUPPORTED_ZRTP_VERSIONS.public java.lang.String[] getHelloHashSep(int index)
getHelloHashSep
in interface ZrtpControl
index
- Hello hash of the Hello packet identfied by index. Index must
be 0 <= index < SUPPORTED_ZRTP_VERSIONS.null
if ZRTP is not available.public int getNumberSupportedVersions()
getNumberSupportedVersions
in interface ZrtpControl
public java.lang.String getPeerHelloHash()
getPeerHelloHash
in interface ZrtpControl
public byte[] getPeerZid()
ZrtpControl
getPeerZid
in interface ZrtpControl
public java.lang.String getPeerZidString()
ZrtpControl
getPeerZidString
in interface ZrtpControl
public boolean getSecureCommunicationStatus()
getSecureCommunicationStatus
in interface SrtpControl
public java.lang.String getSecurityString()
ZrtpControl
getSecurityString
in interface ZrtpControl
public long getTimeoutValue()
getTimeoutValue
in interface ZrtpControl
protected ZRTPTransformEngine createTransformEngine()
createTransformEngine
in class AbstractSrtpControl<ZRTPTransformEngine>
public boolean isSecurityVerified()
ZrtpControl
isSecurityVerified
in interface ZrtpControl
public boolean requiresSecureSignalingTransport()
false
, ZRTP exchanges its keys over the media path.requiresSecureSignalingTransport
in interface SrtpControl
false
public void setConnector(AbstractRTPConnector connector)
setConnector
in interface SrtpControl
connector
- the RTPConnector which is to use or uses this
ZRTP enginepublic void setMasterSession(boolean masterSession)
setMasterSession
in interface SrtpControl
setMasterSession
in class AbstractSrtpControl<ZRTPTransformEngine>
masterSession
- whether current control, controls the master sessionpublic void setMultistream(SrtpControl master)
setMultistream
in interface SrtpControl
setMultistream
in class AbstractSrtpControl<ZRTPTransformEngine>
master
- master SRTP datapublic void setSASVerification(boolean verified)
setSASVerification
in interface ZrtpControl
verified
- the new SAS verification statuspublic void start(MediaType mediaType)
start
in interface SrtpControl
mediaType
- the media type of the stream this control controls.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.