Class CryptoAttribute
Class for the crypto SDP attribute for SRTP. See Section 9 of RFC 4568. The format is like:
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:PS1uQCVeeCFCanVmcjkpPywjNWhcYD0mXXtxaVBR|2^20|1:4
There may be more than one inline parameter. inline parameters are delimited by a ";".
Inherited Members
Namespace: SipLib.RtpCrypto
Assembly: SipLib.dll
Syntax
public class CryptoAttribute
Fields
| Edit this page View SourceCryptoSuite
Specifies the crypto-suite to use. The default is AES_CM_128_HMAC_SHA1_80.
Declaration
public string CryptoSuite
Field Value
Type | Description |
---|---|
string |
FEC_KEY
Specifies the fec-key session parameter. The value depends upon the FEC scheme being used. Optional. Set to null if it is not specified.
Declaration
public string? FEC_KEY
Field Value
Type | Description |
---|---|
string |
FEC_ORDER
Specifies the fec-order (for forward error correction) session parameter. Must be "FEC_SRTP" or "SRTP_FEC". Optional. Set to null if it is not specified.
Declaration
public string? FEC_ORDER
Field Value
Type | Description |
---|---|
string |
InlineParameters
Contains a list of key-params. This list must contain at least 1 element.
Declaration
public List<InlineParams> InlineParameters
Field Value
Type | Description |
---|---|
List<InlineParams> |
KDR
Specifies the Key Derivation Rate. Must be in the range of 0 - 24 and is an integer power of 2. Optional. Set to -1 to indicate not specified. An unspecified KDR means that the default KDR of 0 should be used.
Declaration
public int KDR
Field Value
Type | Description |
---|---|
int |
Tag
Value of the tag parameter.
Declaration
public int Tag
Field Value
Type | Description |
---|---|
int |
WSH
Specifies the Window Size Hint used for replay detection. This session parameter is optional. The minimum value is 64. A value of -1 indicates that the field has not been set.
Declaration
public int WSH
Field Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceParse(string)
Parses the value portion of a crypto SDP attribute. See Section 9.1 of RFC 4568. The ABNF for the value portion of this attribute is: tag 1WSP crypto-suite 1WSP key-params (1WSP session-param)
Declaration
public static CryptoAttribute? Parse(string strCrypto)
Parameters
Type | Name | Description |
---|---|---|
string | strCrypto | Input containing the value portion of a crypto SDP attribute. |
Returns
Type | Description |
---|---|
CryptoAttribute | Returns a new CryptoAttribute object if successful or null if an error occurred or the crypto suite is not supported. |
ToString()
Converts this object to a string.
Declaration
public string ToString()
Returns
Type | Description |
---|---|
string | Returns the string version of this object that can be used for the parameters part of a crypto SDP attribute. |