You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.1 KiB
46 lines
1.1 KiB
1 year ago
|
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||
|
#pragma warning disable
|
||
|
using System;
|
||
|
|
||
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.Crypto
|
||
|
{
|
||
|
/// <summary>Basic config for Diffie-Hellman.</summary>
|
||
|
public class TlsDHConfig
|
||
|
{
|
||
|
protected readonly DHGroup m_explicitGroup;
|
||
|
protected readonly int m_namedGroup;
|
||
|
protected readonly bool m_padded;
|
||
|
|
||
|
public TlsDHConfig(DHGroup explicitGroup)
|
||
|
{
|
||
|
this.m_explicitGroup = explicitGroup;
|
||
|
this.m_namedGroup = -1;
|
||
|
this.m_padded = false;
|
||
|
}
|
||
|
|
||
|
public TlsDHConfig(int namedGroup, bool padded)
|
||
|
{
|
||
|
this.m_explicitGroup = null;
|
||
|
this.m_namedGroup = namedGroup;
|
||
|
this.m_padded = padded;
|
||
|
}
|
||
|
|
||
|
public virtual DHGroup ExplicitGroup
|
||
|
{
|
||
|
get { return m_explicitGroup; }
|
||
|
}
|
||
|
|
||
|
public virtual int NamedGroup
|
||
|
{
|
||
|
get { return m_namedGroup; }
|
||
|
}
|
||
|
|
||
|
public virtual bool IsPadded
|
||
|
{
|
||
|
get { return m_padded; }
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
#pragma warning restore
|
||
|
#endif
|