Fix shortHashKeygen, which doesn't have a return value, but was defined as returing Int in JNA defintion
This commit is contained in:
parent
c2b91c2c69
commit
1ff01d0fdd
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user