Example #1
0
        public static byte[] CreateUseSrtpExtension(UseSrtpData useSrtpData)
        {
            if (useSrtpData == null)
            {
                throw new ArgumentNullException("useSrtpData");
            }

            MemoryStream buf = new MemoryStream();

            // SRTPProtectionProfiles
            TlsUtilities.WriteUint16ArrayWithUint16Length(useSrtpData.ProtectionProfiles, buf);

            // srtp_mki
            TlsUtilities.WriteOpaque8(useSrtpData.Mki, buf);

            return(buf.ToArray());
        }
Example #2
0
 public static void AddUseSrtpExtension(IDictionary extensions, UseSrtpData useSRTPData)
 {
     extensions[ExtensionType.use_srtp] = CreateUseSrtpExtension(useSRTPData);
 }