Class SDPSecurityDescription
(SDP) Security Descriptions for Media Streams implementation as basically defined in RFC 4568.
Example 1: Parse crypto attribute
string crypto = "a=crypto:1 AES_256_CM_HMAC_SHA1_80 inline:GTuZoqOsesiK4wfyL7Rsq6uHHwhqVGA+aVuAUnsmWktYacZyJu6/6tUQeUti0Q==";
SDPSecurityDescription localcrypto = SDPSecurityDescription.Parse(crypto);
Example 2: Parse crypto attribute
SDPMediaAnnouncement mediaAudio = new SDPMediaAnnouncement();
//[...]set some SDPMediaAnnouncement properties
SDPSecurityDescription localcrypto = SDPSecurityDescription.CreateNew();
localcrypto.KeyParams.Clear();
localcrypto.KeyParams.Add(SDPSecurityDescription.KeyParameter.CreateNew(SDPSecurityDescription.CryptoSuites.AES_CM_128_HMAC_SHA1_32));
mediaAudio.SecurityDescriptions.Add(localcrypto);
mediaAudio.ToString();
string crypto = "a=crypto:1 AES_256_CM_HMAC_SHA1_80 inline:GTuZoqOsesiK4wfyL7Rsq6uHHwhqVGA+aVuAUnsmWktYacZyJu6/6tUQeUti0Q==";
SDPSecurityDescription desc = SDPSecurityDescription.Parse(crypto);
Inheritance
System.Object
SDPSecurityDescription
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: SIPSorcery.dll
Syntax
public class SDPSecurityDescription
Constructors
|
Improve this Doc
View Source
SDPSecurityDescription()
Declaration
public SDPSecurityDescription()
|
Improve this Doc
View Source
SDPSecurityDescription(UInt32, SDPSecurityDescription.CryptoSuites)
Declaration
public SDPSecurityDescription(uint tag, SDPSecurityDescription.CryptoSuites cryptoSuite)
Parameters
Fields
|
Improve this Doc
View Source
CRYPTO_ATTRIBUE_PREFIX
Declaration
public const string CRYPTO_ATTRIBUE_PREFIX = "a=crypto:"
Field Value
Type |
Description |
System.String |
|
Properties
|
Improve this Doc
View Source
CryptoSuite
Declaration
public SDPSecurityDescription.CryptoSuites CryptoSuite { get; set; }
Property Value
|
Improve this Doc
View Source
KeyParams
Declaration
public List<SDPSecurityDescription.KeyParameter> KeyParams { get; set; }
Property Value
|
Improve this Doc
View Source
SessionParam
Declaration
public SDPSecurityDescription.SessionParameter SessionParam { get; set; }
Property Value
|
Improve this Doc
View Source
Tag
Declaration
public uint Tag { get; set; }
Property Value
Type |
Description |
System.UInt32 |
|
Methods
|
Improve this Doc
View Source
CreateNew(UInt32, SDPSecurityDescription.CryptoSuites)
Declaration
public static SDPSecurityDescription CreateNew(uint tag = 1U, SDPSecurityDescription.CryptoSuites cryptoSuite = SDPSecurityDescription.CryptoSuites.AES_CM_128_HMAC_SHA1_80)
Parameters
Returns
|
Improve this Doc
View Source
Parse(String)
Declaration
public static SDPSecurityDescription Parse(string cryptoLine)
Parameters
Type |
Name |
Description |
System.String |
cryptoLine |
|
Returns
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
|
Improve this Doc
View Source
TryParse(String, out SDPSecurityDescription)
Declaration
public static bool TryParse(string cryptoLine, out SDPSecurityDescription securityDescription)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Extension Methods