Remove invalid return value from JVM JNA definition of sodium_bin2base64, since the actual return value is the pointer to the buffer containing encoded string, not an integer, and we don't use it in any case
This commit is contained in:
parent
1ff01d0fdd
commit
3d2c848a79
@ -161,7 +161,7 @@ interface JnaLibsodiumInterface : Library {
|
|||||||
bin: ByteArray,
|
bin: ByteArray,
|
||||||
binLength: Int,
|
binLength: Int,
|
||||||
variant: Int
|
variant: Int
|
||||||
): Int
|
)
|
||||||
|
|
||||||
// int sodium_base642bin(
|
// int sodium_base642bin(
|
||||||
// unsigned char * const bin, const size_t bin_maxlen,
|
// unsigned char * const bin, const size_t bin_maxlen,
|
||||||
|
@ -71,7 +71,7 @@ actual object LibsodiumUtil {
|
|||||||
data.asByteArray(),
|
data.asByteArray(),
|
||||||
data.size,
|
data.size,
|
||||||
variant.value
|
variant.value
|
||||||
).ensureLibsodiumSuccess()
|
)
|
||||||
//Drop terminating char \0
|
//Drop terminating char \0
|
||||||
return String(result.sliceArray(0 until result.size - 1))
|
return String(result.sliceArray(0 until result.size - 1))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user