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 2024-07-02 18:50:22 +02:00
parent c2b91c2c69
commit 1ff01d0fdd
No known key found for this signature in database
GPG Key ID: 5884AC34A0EC67DB
2 changed files with 2 additions and 2 deletions

View File

@ -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 ----

View File

@ -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
}