Code Monkey home page Code Monkey logo

cordova-plugin-scrypt's People

Contributors

demetris-manikas avatar ggozad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cordova-plugin-scrypt's Issues

Issue with big p parameter

Some derivation results for p=10 N=2^18 on a Galaxy S8:

21.820 21.933 seconds with plugins.scrypt

23.577 22.672 with scrypt-async-js (nice job @dchest)

I will do more tests yet... it's weird that a native lib is barely faster than a pure JS lib. I was wondering is there anything on top of your head that can be optimized to deal with p more smoothly, like run derivation in parallel?

This is cross platform code used:


function derive(password, email, cb){
  var opts = {
    N: Math.pow(2,18),
    interruptStep: 0,
    p: 10,
    r: 8,
    dkLen: 32,
    encoding: 'base64'
  }

  if(E){
    nodeRequire("scrypt").hash(password,opts,32,email).then(function(root){cb(root.toString("base64"))})
  }else if(window.plugins && window.plugins.scrypt){
    window.plugins.scrypt(function(root){cb(hexToBase64(root));}, alert, password, email, opts)
  }else{
    setTimeout(function(){ //interrupt step prevents animation
      scryptjs(password, email, opts, cb)
    },0)
  }
}

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.