Refactor KeyManager and TagRecogniser. #55

This commit is contained in:
akwizgran
2015-02-12 09:11:24 +00:00
parent 878a70620d
commit 9868feeb2a
60 changed files with 2123 additions and 3840 deletions

View File

@@ -7,6 +7,9 @@ import java.io.File;
import java.util.Random;
import java.util.concurrent.atomic.AtomicInteger;
import org.briarproject.api.UniqueId;
import org.briarproject.api.crypto.SecretKey;
public class TestUtils {
private static final AtomicInteger nextTestDir =
@@ -35,4 +38,10 @@ public class TestUtils {
c[i] = (char) ('a' + random.nextInt(26));
return new String(c);
}
public static SecretKey createSecretKey() {
byte[] b = new byte[SecretKey.LENGTH];
random.nextBytes(b);
return new SecretKey(b);
}
}