forked from sergeych/crypto2
+EncryptedKVStorage
This commit is contained in:
1 parent
776f4e75ff
commit
fe6190eb8d
4 files changed
+161
-5
No files matched your search
@@ -9,10 +9,10 @@
|
||||
*/
|
||||
|
||||
import kotlinx.coroutines.test.runTest
|
||||
import net.sergeych.bintools.ByteChunk
|
||||
import net.sergeych.bintools.toDump
|
||||
import net.sergeych.bipack.BipackEncoder
|
||||
import net.sergeych.crypto2.BinaryId
|
||||
import net.sergeych.crypto2.ByteChunk
|
||||
import net.sergeych.crypto2.initCrypto
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertContentEquals
|
||||
@@ -35,10 +35,10 @@ class BinaryIdTest {
|
||||
initCrypto()
|
||||
val x = ByteChunk.random(3)
|
||||
assertEquals(3, x.data.size)
|
||||
assertEquals(3, x.toByteArray().size)
|
||||
assertEquals(3, x.toUByteArray().size)
|
||||
assertEquals(3, x.asByteArray.size)
|
||||
assertEquals(3, x.data.size)
|
||||
println(BipackEncoder.encode(x).toDump())
|
||||
assertEquals(4, BipackEncoder.encode(x).size)
|
||||
assertContentEquals(BipackEncoder.encode(x.toByteArray()), BipackEncoder.encode(x))
|
||||
assertContentEquals(BipackEncoder.encode(x.asByteArray), BipackEncoder.encode(x))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user