Code Monkey home page Code Monkey logo

Comments (4)

gurpreet- avatar gurpreet- commented on May 29, 2024 1

Hi @davidperrenoud,

Just checked and I believe that the cryptoSignDetached is no longer using long as the 4th parameter. Also the 2nd parameter requires an int array but it is not required. The reason it's not required is that the libsodium docs states that the 2nd parameter is a pointer to where to store the message length. However, Java does not work with pointers so setting it to null is preferred.

Therefore, your function call would look more like the following: sodium.cryptoSignDetached(sig, null, m, m.length, sk).

from lazysodium-java.

davidperrenoud avatar davidperrenoud commented on May 29, 2024

Related to this, what would be the changes required to make LazySodium work with Docker image openjdk:13-alpine which does not include glibc? Currently I'm using openjdk:11-slim.

Alpine Linux does not have glibc, but there is a packaged version of libsodium.

from lazysodium-java.

gurpreet- avatar gurpreet- commented on May 29, 2024

Related to this, what would be the changes required to make LazySodium work with Docker image openjdk:13-alpine which does not include glibc? Currently I'm using openjdk:11-slim.

Alpine Linux does not have glibc, but there is a packaged version of libsodium.

Okay so judging by the package, it installs libsodium to /usr/lib/libsodium.so.23 or /usr/lib/libsodium.so.23.1.0 which is great 👍

You could try providing an absolute path to that libsodium.so file when creating a SodiumJava instance.

String path = "/usr/lib/libsodium.so.23" // or perhaps /usr/lib/libsodium.so.23.1.0
SodiumJava sodium = new SodiumJava(path);
LazySodiumJava lazySodium = new LazySodiumJava(sodium);

It may or may not work, I have not tested it extensively. If it does not work, then please open a new issue and I'll be happy to take a look into it.

from lazysodium-java.

gurpreet- avatar gurpreet- commented on May 29, 2024

Hi @davidperrenoud,

Please try version 3.7.1 or 3.8.0 for a fix on this. There has been significant improvements in terms of the concurrency of this library. Not only that, there has been a PR to resolve the issue you are having 🙂

from lazysodium-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.