init commit

This commit is contained in:
2025-10-09 09:57:24 +09:00
commit 4d551bd74f
6636 changed files with 1218703 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
namespace Org.BouncyCastle.Math.Field;
internal class PrimeField : IFiniteField
{
protected readonly BigInteger characteristic;
public virtual BigInteger Characteristic => characteristic;
public virtual int Dimension => 1;
internal PrimeField(BigInteger characteristic)
{
this.characteristic = characteristic;
}
public override bool Equals(object obj)
{
if (this == obj)
{
return true;
}
if (!(obj is PrimeField primeField))
{
return false;
}
return characteristic.Equals(primeField.characteristic);
}
public override int GetHashCode()
{
return characteristic.GetHashCode();
}
}