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:
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -161,7 +161,7 @@ interface JnaLibsodiumInterface : Library {
|
||||
bin: ByteArray,
|
||||
binLength: Int,
|
||||
variant: Int
|
||||
): Int
|
||||
)
|
||||
|
||||
// int sodium_base642bin(
|
||||
// unsigned char * const bin, const size_t bin_maxlen,
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ actual object LibsodiumUtil {
|
||||
data.asByteArray(),
|
||||
data.size,
|
||||
variant.value
|
||||
).ensureLibsodiumSuccess()
|
||||
)
|
||||
//Drop terminating char \0
|
||||
return String(result.sliceArray(0 until result.size - 1))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user