You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use libsodium inside of a java project to handle some of the security features (obviously). However after getting libsodium on my Win10 pc and struggling to have it recognized by the Java project (libsodium-jna) when I run testing it fails on atleast 13 different functions. Every error is essentially the same where the value read into java from the c source is an incorrect size. For example when crypto_pwhash_scryptsalsa208sha256( args) is tested, the value from crypto_pwhash_scryptsalsa208sha256 is actually a different value (i.e. 148313329629134880, 63310704161062944) every time and forces a failure in comparison to length of a salt (32). In Java the exception is thrown as "SodiumLibraryException: salt is 32, it must be 63310704161062944 bytes" Of course this is mostly dependent on the Java library's implementation of everything but I was curious if you had any low-level insights as why it might getting incorrect values for the saltbytes. If more info is needed please let me know, If this isn't the right place to ask this question I apologize.
The text was updated successfully, but these errors were encountered:
This looks like a 32bit vs 64bit issue. But the best place to ask help with libsodium-jna would be its own repository: https://github.com/muquit/libsodium-jna
I'm trying to use libsodium inside of a java project to handle some of the security features (obviously). However after getting libsodium on my Win10 pc and struggling to have it recognized by the Java project (libsodium-jna) when I run testing it fails on atleast 13 different functions. Every error is essentially the same where the value read into java from the c source is an incorrect size. For example when crypto_pwhash_scryptsalsa208sha256( args) is tested, the value from crypto_pwhash_scryptsalsa208sha256 is actually a different value (i.e. 148313329629134880, 63310704161062944) every time and forces a failure in comparison to length of a salt (32). In Java the exception is thrown as "SodiumLibraryException: salt is 32, it must be 63310704161062944 bytes" Of course this is mostly dependent on the Java library's implementation of everything but I was curious if you had any low-level insights as why it might getting incorrect values for the saltbytes. If more info is needed please let me know, If this isn't the right place to ask this question I apologize.
The text was updated successfully, but these errors were encountered: