class Elligator2 extends Object
| Constructor and Description |
|---|
Elligator2(I2PAppContext ctx)Create an Elligator2 instance. |
| 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. |
public Elligator2(I2PAppContext ctx)
ctx - the I2P app contextpublic 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 31public static PublicKey decode(byte[] representative)
representative - the encoded data, little endian, 32 bytes
WILL BE MODIFIED by masking byte 31public byte[] encode(PublicKey point)
point - the public key to encode