public class BigIntegerLittleEndianEncoding extends Encoding implements Serializable
| Constructor and Description |
|---|
BigIntegerLittleEndianEncoding() |
| Modifier and Type | Method and Description |
|---|---|
FieldElement |
decode(byte[] in)
Decode a FieldElement from its (b-1)-bit encoding.
|
byte[] |
encode(BigInteger x)
Convert x to little endian.
|
byte[] |
encode(FieldElement x)
Encode a FieldElement in its (b-1)-bit encoding.
|
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) |
BigInteger |
toBigInteger(byte[] in)
Convert in to big endian
|
public byte[] encode(FieldElement x)
Encodingpublic byte[] encode(BigInteger x)
public FieldElement decode(byte[] in)
Encodingpublic BigInteger toBigInteger(byte[] in)
public boolean isNegative(FieldElement x)
isNegative in class EncodingCopyright © 2016. All rights reserved.