terl / lazysodium-java

A Java implementation of the Libsodium crypto library. For the lazy dev.
https://github.com/terl/lazysodium-java/wiki
Mozilla Public License 2.0
135 stars 48 forks source link

Fix library loading concurrency issues #50

Closed dmitry-timofeev closed 5 years ago

dmitry-timofeev commented 5 years ago

Fixes #49

dmitry-timofeev commented 5 years ago

Hi @gurpreet- , thank you for reviewing and integrating that fast 👍

The LibraryLoader is actually renamed from NativeUtils — probably git shows it as added because of many changed lines — and the method that copies the library from jar comes from NativeUtils. FYI, there is one questionable block of code that requests the input stream twice — I didn't know what to do with it and marked it with 'fixme' for discussion.

gurpreet- commented 5 years ago

Yeah I saw that block of code. I have commented that section of code out. There are so many systems that may run Lazysodium and I cannot test it out on all of them, so it's best to play it safe 👍