Universal keys. fixed bugs with keys serialization and equality
This commit is contained in:
1 parent
9027bb0e88
commit
f64412fdc7
18 files changed
+593
-26
No files matched your search
@@ -3,6 +3,7 @@ import com.ionspin.kotlin.crypto.util.encodeToUByteArray
|
||||
import kotlinx.coroutines.test.runTest
|
||||
import kotlinx.serialization.encodeToString
|
||||
import kotlinx.serialization.json.Json
|
||||
import net.sergeych.bipack.BipackEncoder
|
||||
import net.sergeych.crypto2.*
|
||||
import net.sergeych.utools.now
|
||||
import net.sergeych.utools.pack
|
||||
@@ -153,6 +154,11 @@ class KeysTest {
|
||||
assertContentEquals(plain, m.decrypt(sk1))
|
||||
}
|
||||
|
||||
val x1 = BipackEncoder.encode(Asymmetric.createMessage(sk0, pk1, plain))
|
||||
val x2 = BipackEncoder.encode(Asymmetric.createMessage(sk0, pk1, plain))
|
||||
|
||||
assertFalse { x1 contentEquals x2 }
|
||||
|
||||
}
|
||||
@Test
|
||||
fun asymmetricKeySerializationTest() = runTest {
|
||||
|
||||
Reference in new issue
Block a user