init commit

This commit is contained in:
2025-10-09 09:57:24 +09:00
commit 4d551bd74f
6636 changed files with 1218703 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
using System;
namespace Org.BouncyCastle.Crypto.Tls;
public class UseSrtpData
{
protected readonly int[] mProtectionProfiles;
protected readonly byte[] mMki;
public virtual int[] ProtectionProfiles => mProtectionProfiles;
public virtual byte[] Mki => mMki;
public UseSrtpData(int[] protectionProfiles, byte[] mki)
{
if (protectionProfiles == null || protectionProfiles.Length < 1 || protectionProfiles.Length >= 32768)
{
throw new ArgumentException("must have length from 1 to (2^15 - 1)", "protectionProfiles");
}
if (mki == null)
{
mki = TlsUtilities.EmptyBytes;
}
else if (mki.Length > 255)
{
throw new ArgumentException("cannot be longer than 255 bytes", "mki");
}
mProtectionProfiles = protectionProfiles;
mMki = mki;
}
}