mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Refactor KeyManager and TagRecogniser. #55
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user