Package org.mariadb.jdbc.plugin.authentication.standard.ed25519.math

## Class FieldElement

- java.lang.Object
- - org.mariadb.jdbc.plugin.authentication.standard.ed25519.math.FieldElement

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `Ed25519FieldElement`

    public abstract class FieldElement
    extends Object
    implements Serializable

Note: concrete subclasses must implement hashCode() and equals()

See Also:
  Serialized Form

### Field Summary

Fields
`protected Field` `f`

### Constructor Summary

Constructors
`FieldElement​(Field f)`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`abstract FieldElement` `add​(FieldElement val)`
`FieldElement` `addOne()`
`abstract FieldElement` `cmov​(FieldElement val, int b)`
`FieldElement` `divide​(FieldElement val)`
`abstract FieldElement` `invert()`
`boolean` `isNegative()`
`abstract boolean` `isNonZero()`
`abstract FieldElement` `multiply​(FieldElement val)`
`abstract FieldElement` `negate()`
`abstract FieldElement` `pow22523()`
`abstract FieldElement` `square()`
`abstract FieldElement` `squareAndDouble()`
`abstract FieldElement` `subtract​(FieldElement val)`
`FieldElement` `subtractOne()`
`byte[]` `toByteArray()` Encode a FieldElement in its $(b-1)$-bit encoding.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### f

    protected final Field f

### Constructor Detail

#### FieldElement

    public FieldElement​(Field f)

### Method Detail

#### toByteArray

    public byte[] toByteArray()

Encode a FieldElement in its $(b-1)$-bit encoding.

Returns:
  the $(b-1)$-bit encoding of this FieldElement.

#### isNonZero

    public abstract boolean isNonZero()

#### isNegative

    public boolean isNegative()

#### add

    public abstract FieldElement add​(FieldElement val)

#### addOne

    public FieldElement addOne()

#### subtract

    public abstract FieldElement subtract​(FieldElement val)

#### subtractOne

    public FieldElement subtractOne()

#### negate

    public abstract FieldElement negate()

#### divide

    public FieldElement divide​(FieldElement val)

#### multiply

    public abstract FieldElement multiply​(FieldElement val)

#### square

    public abstract FieldElement square()

#### squareAndDouble

    public abstract FieldElement squareAndDouble()

#### invert

    public abstract FieldElement invert()

#### pow22523

    public abstract FieldElement pow22523()

#### cmov

    public abstract FieldElement cmov​(FieldElement val,
                                      int b)