public abstract class Encoding
extends java.lang.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)
val - the (b-1)-bit encoding of a FieldElement.public abstract boolean isNegative(FieldElement x)