Public-key encryption
This commit is contained in:
1 parent
98cba5b129
commit
a71a666568
2 files changed
+112
-3
No files matched your search
@@ -124,6 +124,14 @@ class KeysTest {
|
||||
assertContentEquals(plain, m.decrypt(sk2))
|
||||
}
|
||||
|
||||
m = pk2.encryptAnonymously(plain)
|
||||
assertContentEquals(plain, m.decrypt(sk2))
|
||||
assertContentEquals(plain, sk2.decrypt(m))
|
||||
assertContentEquals(plain, sk2.decrypt(sk1.encrypt(plain, pk2)))
|
||||
assertThrows<DecryptionFailedException> {
|
||||
assertContentEquals(plain, m.decrypt(sk1))
|
||||
}
|
||||
|
||||
}
|
||||
@Test
|
||||
fun asymmetricKeySerializationTest() = runTest {
|
||||
|
||||
Reference in new issue
Block a user