buildUseSrtpExtension

fnubyte[] buildUseSrtpExtension(const(SrtpProfile[]) profiles, const(ubyte)[] mki = null)

Builds the use_srtp extension body for ClientHello/ServerHello.

Wire format (RFC 5764 §4.1.1):

struct {
  SRTPProtectionProfile SRTPProtectionProfiles<2..2^16-1>;
  opaque srtp_mki<0..2^8-1>;
}

Parameters

profilesSRTP profiles to include.
mkiMaster Key Identifier (usually empty).

Returns

Extension body bytes (without extension type and length header).