Giter Site home page Giter Site logo

Comments (6)

weilu avatar weilu commented on June 11, 2024

@dcousens any idea on how to fix this?

from crypto-browserify.

dcousens avatar dcousens commented on June 11, 2024

The easy solution is obvious. But, I think we can do better. (No idea on how yet)

from crypto-browserify.

killerstorm avatar killerstorm commented on June 11, 2024

Now you have:

  1. pbkdf2-compat code modified specifically for integration with crypto-browserify
  2. pbkdf.js which is a wrapper for pbkdf2-compat
  3. three lines in index.js

So there is a lot of extra code which implements integration, and it still doesn't work very well.

Isn't it obvious that it world be better if you add pbkdf2-compat code to crypto-browserify?

Sure, it's a bit ugly, but now you have a solution which is both ugly and has problems.

from crypto-browserify.

dominictarr avatar dominictarr commented on June 11, 2024

ah, okay the solution is quite simple, crypto-browserify needs to call

var pbkdf2 = require('pbkdf2-compat/pbkdf2') //instead of 'pbkdf2-compat'
//and then pass it self in
var tmp = pbkdf2(crypto)
crypto.pbkdf2 = tmp.pbkdf2
crypto.pbkdf2Sync = tmp.pbkdf2Sync

pbkdf2-compat only does require('crypto') from index, so this will work.

from crypto-browserify.

dominictarr avatar dominictarr commented on June 11, 2024

the solution was just this: 1aef109

from crypto-browserify.

dominictarr avatar dominictarr commented on June 11, 2024

published in [email protected]

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.