Skip to content

Commit

Permalink
XIVY-12667 Added test for KeyPairGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
ivy-fhe committed Oct 25, 2023
1 parent f2e0a5c commit 2ec9a20
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package threema.connector.test.util;

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.Test;

import util.KeyPairGenerator;
import util.KeyPairGenerator.KeyPair;

public class KeyPairGeneratorTest {

@Test
void generateKeyPair() {
KeyPair keys = KeyPairGenerator.generate();
assertThat(keys.publicKey()).isNotEmpty();
assertThat(keys.privateKey()).isNotEmpty();

assertThat(keys.publicKey().length()).isEqualTo(64);
assertThat(keys.privateKey().length()).isEqualTo(64);
}

}

0 comments on commit 2ec9a20

Please sign in to comment.