-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ed25519 JS signature as buffer not hex buffer
Signed-off-by: Javier Ribó <[email protected]>
- Loading branch information
1 parent
2b4a59b
commit 93a10dc
Showing
5 changed files
with
38 additions
and
8 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
apollo/src/appleTest/kotlin/org/hyperledger/identus/apollo/secp256k1/KMMEdKeyPairTest.kt
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.hyperledger.identus.apollo.secp256k1 | ||
|
||
import org.hyperledger.identus.apollo.base64.base64DecodedBytes | ||
import org.hyperledger.identus.apollo.utils.KMMEdPublicKey | ||
import kotlin.test.Test | ||
import kotlin.test.assertTrue | ||
|
||
class KMMEdKeyPairTest { | ||
|
||
@Test | ||
fun ed_signature_verify() { | ||
val message = "testing".encodeToByteArray() | ||
val edsk = KMMEdPublicKey("z+a8g8i/3yajE/QDIxIF7sP1m/aLKTOfygIuSJanRAg".base64DecodedBytes) | ||
val sig = "zZzeTBYjrpowc+skEMVQSVTzntzXvZGcbBbNY0gHKF6z+e40Q5G3o35lX4Mf0J8iRde/LAn77JdzIh6gQv7hAA".base64DecodedBytes | ||
val verify = edsk.verify(message, sig) | ||
assertTrue(verify) | ||
} | ||
} |
16 changes: 11 additions & 5 deletions
16
apollo/src/appleTest/kotlin/org/hyperledger/identus/apollo/secp256k1/Secp256k1Tests.kt
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
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
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
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