Package ch.imvs.sdes4j.srtp
Class KdrSessionParam
- java.lang.Object
-
- ch.imvs.sdes4j.srtp.SrtpSessionParam
-
- ch.imvs.sdes4j.srtp.KdrSessionParam
-
- All Implemented Interfaces:
SessionParam
public class KdrSessionParam extends SrtpSessionParam
KDR specifies the Key Derivation Rate, as described in Section 4.3.1 of [RFC3711]. The value n MUST be a decimal integer in the set {1,2,...,24}, which denotes a power of 2 from 2^1 to 2^24, inclusive; leading zeroes MUST NOT be used. The SRTP key derivation rate controls how frequently a new session key is derived from an SRTP master key(s) [RFC3711] given in the declaration. When the key derivation rate is not specified (i.e., the KDR parameter is omitted), a single initial key derivation is performed [RFC3711].- Author:
- Ingo Bauersachs
-
-
Constructor Summary
Constructors Constructor Description KdrSessionParam(int kdr)
Creates a new instance of this class from a known derivation rate.KdrSessionParam(java.lang.String param)
Creates a new instance of this class from the textual representation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
encode()
Encodes the information contained in this object for use in the complete crypto attribute.int
getKeyDerivationRate()
The key derivation rate as encoded in the session parameters.int
getKeyDerivationRateExpanded()
The key derivation rate in its exponentiated form.-
Methods inherited from class ch.imvs.sdes4j.srtp.SrtpSessionParam
create
-
-
-
-
Constructor Detail
-
KdrSessionParam
public KdrSessionParam(int kdr)
Creates a new instance of this class from a known derivation rate.- Parameters:
kdr
- The key derivation rate.
-
KdrSessionParam
public KdrSessionParam(java.lang.String param)
Creates a new instance of this class from the textual representation.- Parameters:
param
- The textual representation of the key derivation rate parameter.
-
-
Method Detail
-
getKeyDerivationRate
public int getKeyDerivationRate()
The key derivation rate as encoded in the session parameters.- Returns:
- decimal integer in the set {1,2,...,24}
-
getKeyDerivationRateExpanded
public int getKeyDerivationRateExpanded()
The key derivation rate in its exponentiated form.- Returns:
- integer in the range from 2 to 16'777'216.
-
encode
public java.lang.String encode()
Description copied from interface:SessionParam
Encodes the information contained in this object for use in the complete crypto attribute.- Returns:
- Textual representation of the session parameter.
-
-