Giter VIP home page Giter VIP logo

Comments (17)

kozw avatar kozw commented on September 27, 2024 2

The list is up-to-date, crypto_sign_* only works on iOS. I'm looking into alternative Android bindings, in order to bring Android support in line with iOS.

from flutter_sodium.

jeprojects avatar jeprojects commented on September 27, 2024 1

Added to following methods in a pull request: joshjdevl/libsodium-jni#115

crypto_aead_chacha20poly1305_encrypt_detached 
crypto_aead_chacha20poly1305_decrypt_detached
crypto_aead_chacha20poly1305_keygen
crypto_aead_chacha20poly1305_ietf_encrypt_detached
crypto_aead_chacha20poly1305_ietf_decrypt_detached
crypto_aead_chacha20poly1305_ietf_keygen
crypto_aead_xchacha20poly1305_ietf_encrypt
crypto_aead_xchacha20poly1305_ietf_decrypt
crypto_aead_xchacha20poly1305_ietf_encrypt_detached
crypto_aead_xchacha20poly1305_ietf_decrypt_detached
crypto_aead_xchacha20poly1305_ietf_keygen

crypto_aead_chacha20poly1305_ietf_encrypt already exists

from flutter_sodium.

jeprojects avatar jeprojects commented on September 27, 2024 1

Looks like my pull request was approved: joshjdevl/libsodium-jni#115

Feel free to update your libsodium-jni version from their git master and add the missing crypto_aead* and crypto_box_curve25519xchacha20poly1305 methods for android :)

from flutter_sodium.

kozw avatar kozw commented on September 27, 2024 1

Full crypto_aead_* support is now available in flutter_sodium 0.0.7

from flutter_sodium.

jeprojects avatar jeprojects commented on September 27, 2024

I tested the sodium_version_string method, it returns a byte[] and not a string.

This worked for me:

    public void Version() {
        Sodium sodium= NaCl.sodium();

        byte[] version = Sodium.sodium_version_string();

        version.toString();

        System.out.print(version);
    }

from flutter_sodium.

kozw avatar kozw commented on September 27, 2024

I've tried using sodium_version_string with a byte[], but whatever I do, it always results in the following error (both in emulator and on physical device).

JNI DETECTED ERROR IN APPLICATION: attempt to return an instance of java.lang.String from byte[] org.libsodium.jni.SodiumJNI.sodium_version_string()
...
F/zygote  (26780): java_vm_ext.cc:523]   at org.libsodium.jni.SodiumJNI.sodium_version_string(Native method)
F/zygote  (26780): java_vm_ext.cc:523]   at org.libsodium.jni.Sodium.sodium_version_string(Sodium.java:17)
F/zygote  (26780): java_vm_ext.cc:523]   at com.firstfloorsoftware.fluttersodium.FlutterSodiumPlugin.sodium_version_string(FlutterSodiumPlugin.java:1027)
...

The stacktrace suggests an issue in SodiumJNI. How did you manage to get this working?

from flutter_sodium.

kozw avatar kozw commented on September 27, 2024

I've removed crypto_aead_chacha20poly1305_ietf_encrypt from the list. Thank you.

from flutter_sodium.

jeprojects avatar jeprojects commented on September 27, 2024

Yes your right.. When trying sodium_version_string on a device/emulation it explodes with that error.

I tested using libsodium-jni directly in java and not on an android device.

Added the issue here: joshjdevl/libsodium-jni#117

from flutter_sodium.

kozw avatar kozw commented on September 27, 2024

Very cool. Working on it

from flutter_sodium.

ralkan avatar ralkan commented on September 27, 2024

Looks very promising! When could we expect secretbox to be implemented?

from flutter_sodium.

jeprojects avatar jeprojects commented on September 27, 2024

@ralkan SecretBox has already been implemented. There is just the one method crypto_secretbox_keygen that is currently using the randombytes_buf fallback.

from flutter_sodium.

kozw avatar kozw commented on September 27, 2024

Correct, secretbox functions are available in both the core API (Sodium.cryptoSecretbox*) and the high-level API in the class SecretBox.

from flutter_sodium.

ralkan avatar ralkan commented on September 27, 2024

@jeprojects Cool, this is great! Thanks.

from flutter_sodium.

rashedmyt avatar rashedmyt commented on September 27, 2024

is the list up-to-date.. I was wondering if the crypto_sign_* methods are working as expected on both android and ios..

from flutter_sodium.

rashedmyt avatar rashedmyt commented on September 27, 2024

@kozw did you have a look at Google's tink library.. they support android with Java.. and support for iOS with obj-c will be in future according to the roadmap..

from flutter_sodium.

MathiasDeWeerdt avatar MathiasDeWeerdt commented on September 27, 2024

crypto_sign_ed25519_sk_to_curve25519 seems to be implemented but crypto_sign_ed25519_pk_to_curve25519 is not?

from flutter_sodium.

kozw avatar kozw commented on September 27, 2024

This issue is now obsolete with the current FFI implementation.

from flutter_sodium.

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.