public class SrtpKeyParam extends Object implements KeyParam
Modifier and Type | Field and Description |
---|---|
static String |
KEYMETHOD_INLINE
Constant for the
inline key method. |
Constructor and Description |
---|
SrtpKeyParam(String keyParam)
Creates a new instance of this class from the textual representation.
|
SrtpKeyParam(String keyMethod,
byte[] key,
int lifetime,
int mki,
int mkiLength)
Creates a new instance of this class from known parameters.
|
Modifier and Type | Method and Description |
---|---|
String |
encode()
Encodes the information contained in this object for use in the complete
crypto attribute.
|
byte[] |
getKey()
Gets the concatenated master key and salt.
|
String |
getKeyMethod()
The key method for this key parameter.
|
int |
getLifetime()
Gets the master key lifetime (max number of SRTP or SRTCP packets using
this master key)
|
int |
getMki()
Gets the master key identifier in the SRTP packets.
|
int |
getMkiLength()
Gets the length of the MKI field in SRTP packets
|
public static final String KEYMETHOD_INLINE
inline
key method.public SrtpKeyParam(String keyMethod, byte[] key, int lifetime, int mki, int mkiLength)
keyMethod
- The key method for this key parameter. Only
"inline" is currently supported.key
- Concatenated master key and salt; MUST be a unique
cryptographically random value with respect to other master
keys in the entire SDP message (i.e., including master keys
for other streams)lifetime
- The master key lifetime (max number of SRTP or SRTCP packets
using this master key)mki
- The master key identifier in the SRTP packets.mkiLength
- Length of the MKI field in SRTP packets.public SrtpKeyParam(String keyParam)
keyParam
- The textual representation of the key parameter.public String getKeyMethod()
getKeyMethod
in interface KeyParam
public byte[] getKey()
public int getLifetime()
public int getMki()
public int getMkiLength()
Copyright © 2016 University of Applied Sciences Northwestern Switzerland. All rights reserved.