0.5.4: compound hash

This commit is contained in:
sergeych committed 2024-08-25 02:50:42 +02:00
1 parent a947271c3c
commit d0fa74e089
5 files changed
+55 -21

No files matched your search

+12
View File
@@ -35,4 +35,16 @@ class HashTest {
testMethod(Hash.Sha3_384)
}
}
@Test
fun testSynthetic() = runTest {
initCrypto()
val a = Random.Default.nextUBytes(1024)
val x = Hash.Sha3AndBlake.digest(a)
val p1 = x.sliceArray(0..31)
val p2 = x.drop(32)
assertContentEquals(Hash.Blake2b.digest(a), p1)
assertContentEquals(Hash.Sha3_384.digest(a), p2)
}
}