public class CryptoPacketExtension extends AbstractPacketExtension
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CRYPTO_SUITE_ATTR_NAME
The name of the 'crypto-suite' argument.
|
static java.lang.String |
ELEMENT_NAME
The name of the "crypto" element.
|
static java.lang.String |
KEY_PARAMS_ATTR_NAME
The name of the 'key-params' argument.
|
static java.lang.String |
NAMESPACE
The namespace for the "crypto" element.
|
static java.lang.String |
SESSION_PARAMS_ATTR_NAME
The name of the 'session-params' argument.
|
static java.lang.String |
TAG_ATTR_NAME
The name of the 'tag' argument.
|
attributes
Constructor and Description |
---|
CryptoPacketExtension()
Creates a new
CryptoPacketExtension instance with the proper
element name and namespace. |
CryptoPacketExtension(ch.imvs.sdes4j.srtp.SrtpCryptoAttribute cryptoAttribute)
Creates a new
CryptoPacketExtension instance with the proper
element name and namespace and initialises it with the parameters
contained by the cryptoAttribute. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Returns if the current CryptoPacketExtension equals the one given in
parameter.
|
boolean |
equalsCryptoSuite(java.lang.String cryptoSuite)
Returns if the current crypto suite equals the one given in parameter.
|
boolean |
equalsKeyParams(java.lang.String keyParams)
Returns if the current key params equals the one given in parameter.
|
boolean |
equalsSessionParams(java.lang.String sessionParams)
Returns if the current session params equals the one given in parameter.
|
boolean |
equalsTag(java.lang.String tag)
Returns if the current tag equals the one given in parameter.
|
java.lang.String |
getCryptoSuite()
Returns the value of the crypto-suite attribute.
|
java.lang.String |
getKeyParams()
Returns the value of the key-params attribute.
|
java.lang.String |
getSessionParams()
Returns the value of the session-params attribute.
|
java.lang.String |
getTag()
Returns the value of the tag attribute.
|
int |
hashCode() |
void |
setCryptoSuite(java.lang.String cryptoSuite)
Sets the value of the crypto-suite attribute: an identifier that
describes the encryption and authentication algorithms.
|
void |
setKeyParams(java.lang.String keyParams)
Sets the value of the key-params attribute that provides one or
more sets of keying material for the crypto-suite in question).
|
void |
setSessionParams(java.lang.String sessionParams)
Sets the value of the session-params attribute that provides
transport-specific parameters for SRTP negotiation.
|
void |
setTag(java.lang.String tag)
Sets the value of the tag attribute: a decimal number used as
an identifier for a particular crypto element.
|
ch.imvs.sdes4j.srtp.SrtpCryptoAttribute |
toSrtpCryptoAttribute()
Returns a SrtpCryptoAttribute corresponding to this
CryptoPAcketExtension.
|
addChildExtension, addPacket, clone, getAttribute, getAttributeAsInt, getAttributeAsInt, getAttributeAsString, getAttributeAsURI, getAttributeNames, getChildExtensions, getChildExtensionsOfType, getElementName, getFirstChildOfType, getNamespace, getPackets, getText, removeAttribute, setAttribute, setNamespace, setText, toXML
public static final java.lang.String ELEMENT_NAME
public static final java.lang.String NAMESPACE
public static final java.lang.String CRYPTO_SUITE_ATTR_NAME
public static final java.lang.String KEY_PARAMS_ATTR_NAME
public static final java.lang.String SESSION_PARAMS_ATTR_NAME
public static final java.lang.String TAG_ATTR_NAME
public CryptoPacketExtension()
CryptoPacketExtension
instance with the proper
element name and namespace.public CryptoPacketExtension(ch.imvs.sdes4j.srtp.SrtpCryptoAttribute cryptoAttribute)
CryptoPacketExtension
instance with the proper
element name and namespace and initialises it with the parameters
contained by the cryptoAttribute.cryptoAttribute
- The cryptoAttribute containing the crypto-suite,
key-params, session-params and key information.public void setCryptoSuite(java.lang.String cryptoSuite)
cryptoSuite
- a String that describes the encryption and
authentication algorithms.public java.lang.String getCryptoSuite()
public boolean equalsCryptoSuite(java.lang.String cryptoSuite)
cryptoSuite
- a String that describes the encryption and
authentication algorithms.public void setKeyParams(java.lang.String keyParams)
keyParams
- a String that provides one or more sets of
keying material for the crypto-suite in question.public java.lang.String getKeyParams()
public boolean equalsKeyParams(java.lang.String keyParams)
keyParams
- a String that provides one or more sets of
keying material for the crypto-suite in question.public void setSessionParams(java.lang.String sessionParams)
sessionParams
- a String that provides transport-specific
parameters for SRTP negotiation.public java.lang.String getSessionParams()
public boolean equalsSessionParams(java.lang.String sessionParams)
sessionParams
- a String that provides transport-specific
parameters for SRTP negotiation.public void setTag(java.lang.String tag)
tag
- a String containing a decimal number used as an
identifier for a particular crypto element.public java.lang.String getTag()
public boolean equalsTag(java.lang.String tag)
tag
- a String containing a decimal number used as an
identifier for a particular crypto element.public ch.imvs.sdes4j.srtp.SrtpCryptoAttribute toSrtpCryptoAttribute()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- an object which might be an instance of CryptoPacketExtension.public int hashCode()
hashCode
in class java.lang.Object
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.