Class SrtpSession
One direction of SRTP and SRTCP with the AES_CM_128_HMAC_SHA1_80 suite, which WebRTC requires: protects outgoing packets, or checks and decrypts incoming ones.
Namespace: Uniform.Matrix.WebRtc.Srtp
Assembly: Uniform.Matrix.WebRtc.dll
public sealed class SrtpSession
Constructors
|
Edit this page
View Source
Derive the session keys of one direction from its master key and salt.
Declaration
public SrtpSession(ReadOnlySpan<byte> masterKey, ReadOnlySpan<byte> masterSalt)
Parameters
Fields
|
Edit this page
View Source
Length of the master key.
Declaration
public const int MasterKeyLength = 16
Field Value
|
Edit this page
View Source
Length of the master salt.
Declaration
public const int MasterSaltLength = 14
Field Value
|
Edit this page
View Source
Length of the authentication tag.
Declaration
public const int TagLength = 10
Field Value
Methods
|
Edit this page
View Source
Return packet, a compound RTCP packet, protected: encrypted after its first eight bytes, with the E flag and index, and a tag.
Declaration
public byte[] ProtectRtcp(ReadOnlySpan<byte> packet)
Parameters
Returns
|
Edit this page
View Source
Return packet, an RTP packet, protected: its payload encrypted and a tag appended.
Declaration
public byte[] ProtectRtp(ReadOnlySpan<byte> packet)
Parameters
Returns
|
Edit this page
View Source
Return the RTCP packet in packet, an SRTCP packet, decrypted; null when its tag is wrong or it was received already.
Declaration
public byte[]? UnprotectRtcp(ReadOnlySpan<byte> packet)
Parameters
Returns
|
Edit this page
View Source
Return the RTP packet in packet, an SRTP packet, decrypted; null when its tag is wrong or it was received already.
Declaration
public byte[]? UnprotectRtp(ReadOnlySpan<byte> packet)
Parameters
Returns