Fix shortHashKeygen, which doesn't have a return value, but was defined as returing Int in JNA defintion

This commit is contained in:
Ugljesa Jovanovic committed 2024-07-02 18:54:50 +02:00
1 parent c2b91c2c69
commit 1ff01d0fdd
2 files changed
+2 -2

No files matched your search

@@ -274,7 +274,7 @@ interface JnaLibsodiumInterface : Library {
fun crypto_shorthash(out: ByteArray, input: ByteArray, inlen: Long, key: ByteArray): Int
// void crypto_shorthash_keygen(unsigned char k[crypto_shorthash_KEYBYTES])
fun crypto_shorthash_keygen(key: ByteArray): Int
fun crypto_shorthash_keygen(key: ByteArray)
//
// ---- Short hash end ----
@@ -20,7 +20,7 @@ actual object ShortHash {
actual fun shortHashKeygen(): UByteArray {
val key = UByteArray(crypto_shorthash_KEYBYTES)
sodiumJna.crypto_shorthash_keygen(key.asByteArray()).ensureLibsodiumSuccess()
sodiumJna.crypto_shorthash_keygen(key.asByteArray())
return key
}