Closed ionspin closed 3 years ago
I also found a SIGSEGV crash when writing tests because hexEnd and b64End parameters were also expecting pointers instead of byte values, more details in the pull request. Ping me if I need to update the pull request in any way.
Also to add motivation why I need these SodiumJava
functions that are rarely used, I'm writing a libsodium kotlin multiplatform library wrapper and I need to use as close to original libsodium approach wherever I can, so using LazySodiumJava
wouldn't be optimal in that case.
Also thanks for all the work you did on the library!
Similar to the issue #65 there are a couple of codec helper functions that are using java pass-by-value paramateres instead of pointers and therefore not correctly passing back the length information. Base64 to bin libsodium C code:
Lazysodium java code:
If I am not mistaken parameter
binLen
should be of typePointer
like it was handled in this commitThe same situation is repeated for hex2bin Libsodium C code:
Lazysodium java code:
Same paramater name,
binLen