add all
This commit is contained in:
48
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/field/PrimeField.cs
vendored
Normal file
48
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/field/PrimeField.cs
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using System;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.Field
|
||||
{
|
||||
internal class PrimeField
|
||||
: IFiniteField
|
||||
{
|
||||
protected readonly BigInteger characteristic;
|
||||
|
||||
internal PrimeField(BigInteger characteristic)
|
||||
{
|
||||
this.characteristic = characteristic;
|
||||
}
|
||||
|
||||
public virtual BigInteger Characteristic
|
||||
{
|
||||
get { return characteristic; }
|
||||
}
|
||||
|
||||
public virtual int Dimension
|
||||
{
|
||||
get { return 1; }
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (this == obj)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
PrimeField other = obj as PrimeField;
|
||||
if (null == other)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return characteristic.Equals(other.characteristic);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return characteristic.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
Reference in New Issue
Block a user