Class SrtpDecryptor
Class for decrypting SRTP and SRTCP packets received from a remote endpoint.
Inherited Members
Namespace: SipLib.RtpCrypto
Assembly: SipLib.dll
Syntax
public class SrtpDecryptor : SrtpTransformBase
Constructors
| Edit this page View SourceSrtpDecryptor(CryptoContext)
Constructor
Declaration
public SrtpDecryptor(CryptoContext context)
Parameters
Type | Name | Description |
---|---|---|
CryptoContext | context | CryptoContext provided by the remote endpoint if SRTP is being used. If null, then RTP and RTCP packets are not encrypted. |
Methods
| Edit this page View SourceDecryptRtcpPacket(byte[])
Decrypts an RTCP packet if encryption is used.
Declaration
public byte[]? DecryptRtcpPacket(byte[] Pckt)
Parameters
Type | Name | Description |
---|---|---|
byte[] | Pckt | Input RTCP packet. |
Returns
Type | Description |
---|---|
byte[] | Returns the decrypted version of the encrypted input packet if encryption is being used. Returns the original input packet if encryption is not being used. Returns null if an error is detected and the Error property value will indicate the type of error. |
DecryptRtpPacket(byte[])
Decrypts an RTP packet if encryption is used or returns the original data if encryption is not being used.
Declaration
public byte[]? DecryptRtpPacket(byte[] Pckt)
Parameters
Type | Name | Description |
---|---|---|
byte[] | Pckt | Input RTP packet. |
Returns
Type | Description |
---|---|
byte[] | Returns the decrypted version of the encrypted input packet if encryption is being used. Returns the original input packet if encryption is not being used. Returns null if an error is detected and the Error property value will indicate the type of error. |