Validate key derivation inputs: always 32 bytes, never blank.

This commit is contained in:
akwizgran
2013-04-10 12:48:25 +01:00
parent f7c8274944
commit 60dee4611c
2 changed files with 38 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ import static net.sf.briar.api.transport.TransportConstants.TAG_LENGTH;
import java.io.ByteArrayOutputStream;
import java.util.Arrays;
import java.util.Random;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
@@ -78,6 +79,7 @@ public class OutgoingSimplexConnectionTest extends BriarTestCase {
messageId = new MessageId(TestUtils.getRandomId());
transportId = new TransportId(TestUtils.getRandomId());
secret = new byte[32];
new Random().nextBytes(secret);
}
@Test