- Fix delivery instructions test

This commit is contained in:
zzz
2013-01-03 23:13:47 +00:00
parent 999b8d3c68
commit e3ecc42e88
2 changed files with 10 additions and 9 deletions

View File

@ -67,13 +67,13 @@ public class DeliveryInstructions extends DataStructureImpl {
public boolean getEncrypted() { return _encrypted; }
/**
* For cloves only (not tunnels), default false, unused
* For cloves only (not tunnels), default null, unused
* @deprecated unused
*/
public void setEncrypted(boolean encrypted) { _encrypted = encrypted; }
/**
* For cloves only (not tunnels), default false, unused
* For cloves only (not tunnels), default null, unused
* @deprecated unused
*/
public SessionKey getEncryptionKey() { return _encryptionKey; }

View File

@ -26,13 +26,14 @@ public class DeliveryInstructionsTest extends StructureTest {
instructions.setDelayRequested(true);
instructions.setDelaySeconds(42);
instructions.setDeliveryMode(DeliveryInstructions.DELIVERY_MODE_TUNNEL);
instructions.setEncrypted(true);
SessionKey key = new SessionKey();
byte keyData[] = new byte[SessionKey.KEYSIZE_BYTES];
for (int i = 0; i < keyData.length; i++)
keyData[i] = (byte)i;
key.setData(keyData);
instructions.setEncryptionKey(key);
// encryption key read/write disabled
//instructions.setEncrypted(true);
//SessionKey key = new SessionKey();
//byte keyData[] = new byte[SessionKey.KEYSIZE_BYTES];
//for (int i = 0; i < keyData.length; i++)
// keyData[i] = (byte)i;
//key.setData(keyData);
//instructions.setEncryptionKey(key);
Hash hash = new Hash();
byte hashData[] = new byte[32];
for (int i = 0; i < hashData.length; i++)