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)
From javascript version documentation:
The algorithm can return two different values for a single x coordinate if it's not 0.
|
static byte[] |
encode(PublicKey point,
boolean alternative)
From javascript version documentation:
The algorithm can return two different values for a single x coordinate if it's not 0.
|
public Elligator2(I2PAppContext ctx)
public byte[] encode(PublicKey point)
public static byte[] encode(PublicKey point, boolean alternative)
public static PublicKey decode(byte[] representative)
representative
- the encoded data, 32 bytespublic static PublicKey decode(AtomicBoolean alternative, byte[] representative)
alternative
- out parameter, or null if you don't carerepresentative
- the encoded data, 32 bytes