-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from uma-universal-money-address/feat/updatecr…
…ypto Update the crypto libs and clean up a test case to match
- Loading branch information
Showing
6 changed files
with
31 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
@@ -27,8 +28,8 @@ | |
|
||
public class UmaTest { | ||
UmaProtocolHelper umaProtocolHelper = new UmaProtocolHelper(new InMemoryPublicKeyCache(), new TestUmaRequester()); | ||
private static String PUBKEY_HEX = "02061e5634646e60cfbe2ca42e2be920b4deb749f0159ed7c428cdd8e3ea69c133"; | ||
private static String PRIVKEY_HEX = "0e120a3c9ff18d295c6452cbb7ee3bb0f3d9c34f4db9e62293d2773f338a3b9d"; | ||
private static String PUBKEY_HEX = "04f2998ab056897ddb91b5e6fad1e4bb6c4b7dda427409f667d0f4694b553e4feeeb08936c2993f7b931f6a3fa7e846f11165fae222de5e4a55c12def21a7c9fcf"; | ||
private static String PRIVKEY_HEX = "10fbbee8f689b207bb22df2dfa27827ae9ae02e265980ea09ef5101ed5fb508f"; | ||
|
||
|
||
@Test | ||
|
@@ -49,13 +50,15 @@ public void testFetchPublicKeyFuture() throws Exception { | |
public void testGetLnurlpRequest() throws Exception { | ||
String lnurlpUrl = umaProtocolHelper.getSignedLnurlpRequestUrl( | ||
privateKeyBytes(), | ||
"[email protected]", | ||
"https://vasp.com", | ||
true); | ||
"[email protected]", | ||
/* senderVaspDomain */ "myvasp.com", | ||
/* isSubjectToTravelRule */ true | ||
); | ||
assertNotNull(lnurlpUrl); | ||
System.out.println(lnurlpUrl); | ||
LnurlpRequest request = umaProtocolHelper.parseLnurlpRequest(lnurlpUrl); | ||
assertNotNull(request); | ||
assertTrue(umaProtocolHelper.verifyUmaLnurlpQuerySignature(request, new PubKeyResponse(publicKeyBytes(), publicKeyBytes()))); | ||
System.out.println(request); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-1.09 MB
(56%)
uma-sdk/src/jvmMain/resources/darwin-aarch64/libuniffi_uma_crypto.dylib
Binary file not shown.
Binary file modified
BIN
-1.08 MB
(57%)
uma-sdk/src/jvmMain/resources/darwin-x86-64/libuniffi_uma_crypto.dylib
Binary file not shown.
Binary file modified
BIN
-1.09 MB
(57%)
uma-sdk/src/jvmMain/resources/linux-aarch64/libuniffi_uma_crypto.so
Binary file not shown.
Binary file modified
BIN
-1.09 MB
(58%)
uma-sdk/src/jvmMain/resources/linux-x86-64/libuniffi_uma_crypto.so
Binary file not shown.