File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
dotenvx-spring-boot/src/test/java/org/mvnsearch/dotenvx/jwt Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ package org .mvnsearch .dotenvx .jwt ;
2+
3+ import org .junit .jupiter .api .Test ;
4+ import org .mvnsearch .dotenvx .ecies .ECKeyPair ;
5+ import org .mvnsearch .dotenvx .ecies .Ecies ;
6+
7+ import static org .assertj .core .api .Assertions .assertThat ;
8+
9+
10+ public class Secp256k1SignerTest {
11+
12+ @ Test
13+ public void testSign () throws Exception {
14+ final ECKeyPair keyPair = Ecies .generateEcKeyPair ();
15+ byte [] payload = "Hello World!" .getBytes ();
16+ final byte [] signatureBytes = Secp256k1Signer .signData (payload , keyPair .getPrivate ());
17+ final boolean result = Secp256k1Signer .verifySignature (payload , signatureBytes , keyPair .getPublic ());
18+ assertThat (result ).isTrue ();
19+ }
20+ }
You can’t perform that action at this time.
0 commit comments