Giter Site home page Giter Site logo

Comments (6)

calvinmetcalf avatar calvinmetcalf commented on June 5, 2024

moving the discussion of psudorandom over here, ping @ForbesLindesay, some options

  • just have randomBytes and psudoRanomBytes do the same thing in this library
  • create a library that using psudoRanomBytes in node and getRandomValues in the browser
  • create a library that using psudoRanomBytes in node and uses getRandomValues to seed a prng (chacha/chacha20 would be a good bet).

from crypto-browserify.

calvinmetcalf avatar calvinmetcalf commented on June 5, 2024

with some quick googling the underlying functions are exactly the same except with psudoRandomBytes it doesn't throw an error if there is insufficient entropy http://stackoverflow.com/a/18131768

from crypto-browserify.

calvinmetcalf avatar calvinmetcalf commented on June 5, 2024

ok I made a pseudorandombytes, mainly for fun to be clear I don't think we should actually include this, there is really no reason to ever use pseudorandombytes in node so demand for this (which doesn't actually do the same thing) would be pretty low.

from crypto-browserify.

calvinmetcalf avatar calvinmetcalf commented on June 5, 2024

so as it turns out as of nodejs/node#557 which was just merged pseudoRandomBytes is an alias for randomBytes so we can probably do the same thing with it.

from crypto-browserify.

dcousens avatar dcousens commented on June 5, 2024

I'm happy with that decision.

from crypto-browserify.

ForbesLindesay avatar ForbesLindesay commented on June 5, 2024

👍

from crypto-browserify.

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.