crypho / cordova-plugin-scrypt Goto Github PK
View Code? Open in Web Editor NEWAn scrypt implementation for cordova apps in iOS & Android
License: MIT License
An scrypt implementation for cordova apps in iOS & Android
License: MIT License
hex returned is not equal one from node's scrypt or scrypt-async-js libs, for default or any other opts https://gist.github.com/homakov/a3d9ae0a2d83b45e25cc297030dd5522
Is there any example that would return same value for the above libraries and for this plugin? I simply pass password/salt as bare strings UTF8 encoded
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)
}
}
Android currently fails for unicode strings that contain international characters. Added test-case with 'T\xf8nsberg' as example on FIX-unicode branch. Tests pass on iOS. /cc @demetris-manikas
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.