Coder Social home page Coder Social logo

Comments (8)

alax avatar alax commented on May 22, 2024 1

@mdp React Native doesn't use Webkit, it just uses JavaScriptCore, which is a wrapper around Webkit's Javascript engine. That also means that you won't have secure random number generator, so unless you've implemented one yourself, TweetNacl won't even work under React Native.

from tweetnacl-js.

dchest avatar dchest commented on May 22, 2024 1

For everyone's information, this was recently fixed in WebKit https://bugs.webkit.org/show_bug.cgi?id=158576

from tweetnacl-js.

anri-asaturov avatar anri-asaturov commented on May 22, 2024

http://code.google.com/p/gflot/source/browse/trunk/flot/base64.js?r=153 can solve this

from tweetnacl-js.

mdp avatar mdp commented on May 22, 2024

This also happens React Native for iOS since it's using a webkit engine that doesn't support atob and doesn't have Buffer

from tweetnacl-js.

dchest avatar dchest commented on May 22, 2024

@mdp thanks for letting me know!

I think I'll deprecate the nacl.utils part sometime in the future. As explained in docs:

Encoding/decoding functions are provided for convenience. They are correct, however their performance and wide compatibility with uncommon runtimes is not something that is considered important compared to the simplicity and size of implementation. You can use third-party libraries if you need to.

from tweetnacl-js.

mdp avatar mdp commented on May 22, 2024

@dchest Yeah that's fair, I just wanted to add to this thread in case anyone else runs across it.

@alax Thanks, this is really good to know. I was only using it for decryption, but it's something I'll definitely keep in mind.

from tweetnacl-js.

alax avatar alax commented on May 22, 2024

@mdp Ahh, gotcha. Yeah, you are right, decryption would be 100% fine.

from tweetnacl-js.

dchest avatar dchest commented on May 22, 2024

@alax @mdp yep, only key generation needs random numbers: secretbox, cryptobox, signing all work fine without PRNG if you already have keys, as mentioned here.

from tweetnacl-js.

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.