Closed lordrex34 closed 3 years ago
Hi @lordrex34,
Yes this is usually a charset issue or a parameter being incorrect somewhere issue.
I think the issue is in the hardcoding of the nonce value to value. Instead of:
public Test() {
this.key = LAZY_SODIUM_JAVA.cryptoSecretBoxKeygen().getAsBytes();
this.nonce = LAZY_SODIUM_JAVA.nonce(10);
}
it should be:
public Test() {
this.key = LAZY_SODIUM_JAVA.cryptoSecretBoxKeygen().getAsBytes();
this.nonce = LAZY_SODIUM_JAVA.nonce(SecretBox.NONCEBYTES);
}
Thanks
Hello,
Code to reproduce: https://gist.github.com/lordrex34/24d156791658127470c9f20fe8c13922
I made this little gist to help reproduce the problem.
Dependency:
I do 3 to 5 trial runs of this and I get random outcomes.
Output 1:
Output 2:
Output 1 ought to be the normal output, but I get it only few times and output 2 occurs mostly.
I have tried varying LibraryLoader.Mode several times without luck. I even tried using as path libsodium.dll that I built.
Do you have any idea what am I supposed to do?