Remove redundant key generation in tests

This commit is contained in:
René Pfeuffer
2018-11-30 11:26:23 +01:00
parent 205ca42e09
commit f7fc81b626
6 changed files with 19 additions and 34 deletions

View File

@@ -0,0 +1,11 @@
package sonia.scm.security;
import java.security.SecureRandom;
public class SecureKeyTestUtil {
public static SecureKey createSecureKey() {
byte[] bytes = new byte[32];
new SecureRandom().nextBytes(bytes);
return new SecureKey(bytes, System.currentTimeMillis());
}
}