Package ch.imvs.sdes4j.srtp
Class SrtpCryptoAttribute
- java.lang.Object
-
- ch.imvs.sdes4j.CryptoAttribute
-
- ch.imvs.sdes4j.srtp.SrtpCryptoAttribute
-
public class SrtpCryptoAttribute extends CryptoAttribute
Security descriptions attribute for SRTP media streams.- Author:
- Ingo Bauersachs
-
-
Field Summary
-
Fields inherited from class ch.imvs.sdes4j.CryptoAttribute
cryptoSuite, keyParams, sessionParams, tag
-
-
Constructor Summary
Constructors Constructor Description SrtpCryptoAttribute(int tag, SrtpCryptoSuite cryptoSuite, SrtpKeyParam[] keyParams, SrtpSessionParam[] sessionParams)
Creates a crypto attribute from already instantiated objects.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SrtpCryptoAttribute
create(java.lang.String encoded)
Creates an SRTP crypto attribute from its textual representation.static SrtpCryptoAttribute
create(java.lang.String tag, java.lang.String cryptoSuite, java.lang.String keyParams, java.lang.String sessionParams)
Creates an instance of a SrtpCryptoAttribute from SDES attributes (tag, crypto suite, key params and session params).SrtpCryptoSuite
getCryptoSuite()
Gets the identifier that describes the encryption and authentication algorithms (e.g., AES_CM_128_HMAC_SHA1_80) for the transport in question.SrtpKeyParam[]
getKeyParams()
Gets one or more sets of keying material for the crypto-suite in question.SrtpSessionParam[]
getSessionParams()
Gets the additional key parameters for this particular crypto attribute.-
Methods inherited from class ch.imvs.sdes4j.CryptoAttribute
create, create, encode, equals, getKeyParamsString, getSessionParamsString, getTag, hashCode
-
-
-
-
Constructor Detail
-
SrtpCryptoAttribute
public SrtpCryptoAttribute(int tag, SrtpCryptoSuite cryptoSuite, SrtpKeyParam[] keyParams, SrtpSessionParam[] sessionParams)
Creates a crypto attribute from already instantiated objects.- Parameters:
tag
- identifier for this particular crypto attributecryptoSuite
- identifier that describes the encryption and authentication algorithmskeyParams
- one or more sets of keying materialsessionParams
- the additional key parameters
-
-
Method Detail
-
create
public static SrtpCryptoAttribute create(java.lang.String encoded)
Creates an SRTP crypto attribute from its textual representation.- Parameters:
encoded
- The textual representation of the attribute.- Returns:
- The parsed crypto data.
-
create
public static SrtpCryptoAttribute create(java.lang.String tag, java.lang.String cryptoSuite, java.lang.String keyParams, java.lang.String sessionParams)
Creates an instance of a SrtpCryptoAttribute from SDES attributes (tag, crypto suite, key params and session params).- Parameters:
tag
- unparsed tag as a string.cryptoSuite
- the crypto suite as an unparsed string.keyParams
- An unparsed string representation of the key param list (each key must be separated by a ";").sessionParams
- An unparsed string representation of the session param list (each key must be separated by a " ").- Returns:
- a parsed SRTP crypto attribute.
-
getCryptoSuite
public SrtpCryptoSuite getCryptoSuite()
Description copied from class:CryptoAttribute
Gets the identifier that describes the encryption and authentication algorithms (e.g., AES_CM_128_HMAC_SHA1_80) for the transport in question.- Overrides:
getCryptoSuite
in classCryptoAttribute
- Returns:
- the cryptoSuite
-
getKeyParams
public SrtpKeyParam[] getKeyParams()
Description copied from class:CryptoAttribute
Gets one or more sets of keying material for the crypto-suite in question.- Overrides:
getKeyParams
in classCryptoAttribute
- Returns:
- the keyParams
-
getSessionParams
public SrtpSessionParam[] getSessionParams()
Description copied from class:CryptoAttribute
Gets the additional key parameters for this particular crypto attribute.- Overrides:
getSessionParams
in classCryptoAttribute
- Returns:
- the sessionParams
-
-