Comments (12)
On certain android devices (have had this with an s8 for example) for unknown reasons libscrypt gives us wrong results. @demetris-manikas had tried to figure this out with the authors of libscrypt unsuccessfully iirc.
For Crypho we ended up testing first with fast values and then using the sjcl implementation if it failed.
I would definitely appreciate more eyes on this and somebody figuring out, but cannot be of help at the moment.
from cordova-plugin-scrypt.
Can confirm that emulator is working fine... My suggestion would be to put a warning on README for the time being - s8 is quite a popular phone.
I will try to figure out.
from cordova-plugin-scrypt.
The truth is that the problem was solved by using code from another source. Details here. technion/libscrypt#39
@ggozad should we revisit this?
from cordova-plugin-scrypt.
Feel free to fix, I have no time to dig into this at the moment but can test and will accept a PR.
from cordova-plugin-scrypt.
@ggozad There is a branch in this project called FEAT-tarsnap which I believe you already have tested that solves the problem exactly as discussed in technion/libscrypt#39. Feel free to retest!
@homakov Could you test it as well?
from cordova-plugin-scrypt.
Have you tried to run it with phonegap? Because this never runs second alert:
phonegap create itest "itest" "itest"
cd itest
phonegap platform add ios
phonegap plugin add cordova-plugin-scrypt
insert this in index.js
setTimeout(function(){
alert(window.plugins.scrypt)
window.plugins.scrypt(
function (res) { alert(key); },
function (err) { alert(err) },
'password', 'salt', {N: 16384}
)
},3000)
phonegap run ios
It simply does not call success nor error callback in emulator. Will try plain cordova later.
from cordova-plugin-scrypt.
Your code has a mistake. In the success callback "key" is not defined so change it to "res" and report back. Thanks
from cordova-plugin-scrypt.
Sorry, my original code had no mistake and test was wrong. Anyway it still not working:
setTimeout(function(){
alert(window.plugins.scrypt)
window.plugins.scrypt(
function (res) { alert(1); },
function (err) { alert(2) },
'password', 'salt', {N: 16384}
)
},3000)
from cordova-plugin-scrypt.
And just tested same sequence with "cordova" instead of phonegap and it worked.
I can easily switch to cordova but i wonder why phonegap is failing. I have no idea how to debug this one.
from cordova-plugin-scrypt.
I've merged FEAT-tarsnap and added plugin from my repo cordova plugin add https://github.com/homakov/cordova-plugin-scrypt.git
and I get 82e08... on both emulator and my s8. Good results! I will do more tests for my app (efficient scrypt is critical part of it) and thank you for your work and saving me ton of time!
from cordova-plugin-scrypt.
Hey, I've been sick the last few days :( Tomorrow I should be good to go to the office again and will look further into this. I need to review the changes on tarsnap but it seems the issue was the void *
casts which should be resolved now.
from cordova-plugin-scrypt.
Fixed in 2.1.1
from cordova-plugin-scrypt.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-scrypt.