class Elligator2 extends Object
Constructor and Description |
---|
Elligator2(I2PAppContext ctx) |
Modifier and Type | Method and Description |
---|---|
static PublicKey |
decode(AtomicBoolean alternative,
byte[] representative)
From javascript version documentation:
Returns an array with the point and the second argument of the corresponding call to the `encode` function.
|
static PublicKey |
decode(byte[] representative)
From javascript version documentation:
Returns an array with the point and the second argument of the corresponding call to the `encode` function.
|
byte[] |
encode(PublicKey point)
Use for on-the-wire.
|
protected static byte[] |
encode(PublicKey point,
boolean alternative)
Use for unit tests.
|
public Elligator2(I2PAppContext ctx)
public byte[] encode(PublicKey point)
protected static byte[] encode(PublicKey point, boolean alternative)
public static PublicKey decode(byte[] representative)
representative
- the encoded data, little endian, 32 bytes
WILL BE MODIFIED by masking byte 31public static PublicKey decode(AtomicBoolean alternative, byte[] representative)
alternative
- out parameter, or null if you don't carerepresentative
- the encoded data, little endian, 32 bytes;
WILL BE MODIFIED by masking byte 31