Files
ichni_Official/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ECKeyGenerationParameters.cs
2026-06-15 18:18:16 +08:00

46 lines
1.2 KiB
C#

#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
#pragma warning disable
using System;
using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro;
using Best.HTTP.SecureProtocol.Org.BouncyCastle.Security;
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters
{
public class ECKeyGenerationParameters
: KeyGenerationParameters
{
private readonly ECDomainParameters domainParams;
private readonly DerObjectIdentifier publicKeyParamSet;
public ECKeyGenerationParameters(
ECDomainParameters domainParameters,
SecureRandom random)
: base(random, domainParameters.N.BitLength)
{
this.domainParams = domainParameters;
}
public ECKeyGenerationParameters(
DerObjectIdentifier publicKeyParamSet,
SecureRandom random)
: this(ECKeyParameters.LookupParameters(publicKeyParamSet), random)
{
this.publicKeyParamSet = publicKeyParamSet;
}
public ECDomainParameters DomainParameters
{
get { return domainParams; }
}
public DerObjectIdentifier PublicKeyParamSet
{
get { return publicKeyParamSet; }
}
}
}
#pragma warning restore
#endif