up
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
|
||||
using System;
|
||||
|
||||
using Org.BouncyCastle.Asn1;
|
||||
using Org.BouncyCastle.Asn1.CryptoPro;
|
||||
using Org.BouncyCastle.Security;
|
||||
|
||||
namespace 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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user