- Initial commit
This commit is contained in:
35
Runtime/3rdParty/BouncyCastle/crypto/parameters/ElGamalKeyGenerationParameters.cs
vendored
Normal file
35
Runtime/3rdParty/BouncyCastle/crypto/parameters/ElGamalKeyGenerationParameters.cs
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using System;
|
||||
|
||||
using Best.HTTP.SecureProtocol.Org.BouncyCastle.Security;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters
|
||||
{
|
||||
public class ElGamalKeyGenerationParameters
|
||||
: KeyGenerationParameters
|
||||
{
|
||||
private readonly ElGamalParameters parameters;
|
||||
|
||||
public ElGamalKeyGenerationParameters(
|
||||
SecureRandom random,
|
||||
ElGamalParameters parameters)
|
||||
: base(random, GetStrength(parameters))
|
||||
{
|
||||
this.parameters = parameters;
|
||||
}
|
||||
|
||||
public ElGamalParameters Parameters
|
||||
{
|
||||
get { return parameters; }
|
||||
}
|
||||
|
||||
internal static int GetStrength(
|
||||
ElGamalParameters parameters)
|
||||
{
|
||||
return parameters.L != 0 ? parameters.L : parameters.P.BitLength;
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
Reference in New Issue
Block a user