From 78a41da7ef85d961e2eb547416033edbd6f7f189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Ribo=CC=81?= Date: Mon, 30 Sep 2024 17:11:22 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20attempt=20to=20fix=20build=20issue=20Sig?= =?UTF-8?q?ned-off-by:=20Javier=20Ribo=CC=81=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apollo/ed25519/KMMEdKeyPairTest.kt | 39 ------------------- 1 file changed, 39 deletions(-) delete mode 100644 apollo/src/appleTest/kotlin/org/hyperledger/identus/apollo/ed25519/KMMEdKeyPairTest.kt diff --git a/apollo/src/appleTest/kotlin/org/hyperledger/identus/apollo/ed25519/KMMEdKeyPairTest.kt b/apollo/src/appleTest/kotlin/org/hyperledger/identus/apollo/ed25519/KMMEdKeyPairTest.kt deleted file mode 100644 index 2e2c04b1c..000000000 --- a/apollo/src/appleTest/kotlin/org/hyperledger/identus/apollo/ed25519/KMMEdKeyPairTest.kt +++ /dev/null @@ -1,39 +0,0 @@ -package org.hyperledger.identus.apollo.ed25519 - -import org.hyperledger.identus.apollo.base64.base64DecodedBytes -import org.hyperledger.identus.apollo.base64.base64UrlDecodedBytes -import org.hyperledger.identus.apollo.base64.base64UrlEncoded -import org.hyperledger.identus.apollo.utils.KMMEdKeyPair -import org.hyperledger.identus.apollo.utils.KMMEdPrivateKey -import org.hyperledger.identus.apollo.utils.KMMEdPublicKey -import kotlin.test.Test -import kotlin.test.assertNotNull -import kotlin.test.assertTrue - -class KMMEdKeyPairTest { - private val rawSK = "M7+EvGp9vjLyx5SQ1xiKhRUN+YQ0kjx6d21WgX8P1hE".base64DecodedBytes - private val rawSKEncoded = rawSK.base64UrlEncoded - - @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) - } - - @Test - fun testGenerateKeyPair() { - val keyPair = KMMEdKeyPair.generateKeyPair() - assertNotNull(keyPair) - assertNotNull(keyPair.privateKey) - assertNotNull(keyPair.publicKey) - } - - @Test - fun testConstructorEncoded() { - val key = KMMEdPrivateKey(rawSKEncoded.base64UrlDecodedBytes) - assertTrue(key.raw contentEquals rawSK) - } -}