Skip to content

Commit

Permalink
Stricter length tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ilammy committed Dec 6, 2019
1 parent 9e6e068 commit 8534513
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,16 @@
import org.junit.Test;

public class SymmetricKeyTest {

private static final int defaultLength = 32;

@Test
public void generateNewKey() {
SymmetricKey key = new SymmetricKey();

byte[] keyBytes = key.toByteArray();
assertNotNull(keyBytes);
assertTrue(keyBytes.length > 0);
assertEquals(keyBytes.length, defaultLength);
}

@Test
Expand Down

0 comments on commit 8534513

Please sign in to comment.