Class SrtpEncryptor
Class for encypting RTP and RTCP packets to be sent. See RFC 3711.
Inherited Members
Namespace: SipLib.RtpCrypto
Assembly: SipLib.dll
Syntax
public class SrtpEncryptor : SrtpTransformBase
Constructors
| Edit this page View SourceSrtpEncryptor(CryptoContext)
Constructor
Declaration
public SrtpEncryptor(CryptoContext context)
Parameters
Type | Name | Description |
---|---|---|
CryptoContext | context | CryptoContext greated by the sender of the RTP and SRTP. If null, then RTP and RTCP packets are not encrypted. |
Methods
| Edit this page View SourceEncryptRtcpPacket(byte[])
Encrypts a RTCP packet to send
Declaration
public byte[]? EncryptRtcpPacket(byte[] Pckt)
Parameters
Type | Name | Description |
---|---|---|
byte[] | Pckt | Input RTCP packet |
Returns
Type | Description |
---|---|
byte[] | Returns the encrypted RTCP packet if encryption is being used. Returns the original input packet if encryption is not being used. Returns null if an error occurs and the Error property value will indicate the type of error.. |
EncryptRtpPacket(byte[])
Encrypts an RTP packet if encryption is being used.
Declaration
public byte[]? EncryptRtpPacket(byte[] Pckt)
Parameters
Type | Name | Description |
---|---|---|
byte[] | Pckt | Input RTP packet to encrypt. |
Returns
Type | Description |
---|---|
byte[] | Returns an encrypted packet if encryption is being used. Returns the original 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.. |