Fix shortHashKeygen, which doesn't have a return value, but was defined as returing Int in JNA defintion
This commit is contained in:
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -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 ----
|
||||
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user