forked from sergeych/crypto2
0.5.4: compound hash
This commit is contained in:
1 parent
a947271c3c
commit
d0fa74e089
5 files changed
+55
-21
No files matched your search
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user