public abstract class Encoding extends Object
Constructor and Description |
---|
Encoding() |
Modifier and Type | Method and Description |
---|---|
abstract FieldElement |
decode(byte[] in)
Decode a FieldElement from its (b-1)-bit encoding.
|
abstract byte[] |
encode(FieldElement x)
Encode a FieldElement in its (b-1)-bit encoding.
|
abstract boolean |
isNegative(FieldElement x)
From the Ed25519 paper:
x is negative if the (b-1)-bit encoding of x is lexicographically larger than the (b-1)-bit encoding of -x. |
void |
setField(Field f) |
protected Field f
public void setField(Field f)
public abstract byte[] encode(FieldElement x)
public abstract FieldElement decode(byte[] in)
in
- the (b-1)-bit encoding of a FieldElement.public abstract boolean isNegative(FieldElement x)