public class BuildResponseRecord extends Object
Bytes 0-31 contain the hash of bytes 32-527 Bytes 32-526 contain random data. Byte 527 contains the reply.
| Constructor and Description |
|---|
BuildResponseRecord() |
| Modifier and Type | Method and Description |
|---|---|
static EncryptedBuildRecord |
create(net.i2p.I2PAppContext ctx,
int status,
net.i2p.data.SessionKey replyKey,
byte[] replyIV,
long responseMessageId)
Create a new encrypted response.
|
static EncryptedBuildRecord |
create(net.i2p.I2PAppContext ctx,
int status,
net.i2p.data.SessionKey replyKey,
byte[] replyAD,
Properties options)
Create a new encrypted response.
|
static boolean |
decrypt(EncryptedBuildRecord rec,
net.i2p.data.SessionKey key,
byte[] ad) |
public static EncryptedBuildRecord create(net.i2p.I2PAppContext ctx, int status, net.i2p.data.SessionKey replyKey, byte[] replyIV, long responseMessageId)
status - the response 0-255replyIV - 16 bytesresponseMessageId - unused except for debuggingpublic static EncryptedBuildRecord create(net.i2p.I2PAppContext ctx, int status, net.i2p.data.SessionKey replyKey, byte[] replyAD, Properties options)
status - the response 0-255replyAD - 32 bytesoptions - 511 bytes max when serializedIllegalArgumentException - if options too big or on encryption failurepublic static boolean decrypt(EncryptedBuildRecord rec, net.i2p.data.SessionKey key, byte[] ad)