Fixed some of the errors spotted in various aes implementation while doing cryptopals challenge, anyways they were unused. Added multipart generic hash (blake2b) native implementation

This commit is contained in:
Ugljesa Jovanovic authored and Ugljesa Jovanovic committed 2020-08-26 19:58:57 +02:00
1 parent 231a84af67
commit 6f38a01195
6 files changed
+88 -11

No files matched your search

@@ -5,6 +5,22 @@ package com.ionspin.kotlin.crypto.generichash
* ugljesa.jovanovic@ionspin.com
* on 21-Aug-2020
*/
data class GenericHashState(val hashLength: Int, val state: GenericHashStateInternal)
expect class GenericHashStateInternal
expect object GenericHashing {
fun genericHash(message : UByteArray, requestedHashLength: Int, key : UByteArray? = null) : UByteArray
fun genericHashInit(requestedHashLength: Int, key : UByteArray? = null) : GenericHashState
fun genericHashUpdate(state: GenericHashState, messagePart : UByteArray)
fun genericHashFinal(state : GenericHashState) : UByteArray
}