Adding data classes

This commit is contained in:
Ugljesa Jovanovic committed 2020-08-14 12:39:27 +02:00
1 parent fcc4d87610
commit a5b20daf5a
17 files changed
+263 -375

No files matched your search

@@ -9,7 +9,13 @@ expect class Sha512State
expect class GenericHashState
expect class SecretStreamState
expect class Crypto internal constructor() {
/**
* Initialize the SHA256 hash
* returns sha 256 state
*/
fun crypto_hash_sha256_init(): Sha256State
fun crypto_hash_sha256_update(state: Sha256State, input: UByteArray)
@@ -23,4 +29,11 @@ expect class Crypto internal constructor() {
fun crypto_hash_sha512_final(state: Sha512State): UByteArray
fun crypto_generichash_init(key: UByteArray, outlen: Int): GenericHashState
fun crypto_secretstream_xchacha20poly1305_init_push(key: UByteArray): UByteArray
data class SecretStreamStateAndHeader(
val state: SecretStreamState,
val header: UByteArray
)
}