-
Notifications
You must be signed in to change notification settings - Fork 21
Changed function signature to pass all arguments as hexadecimal strings #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…re now all passed as hexadecimal strings ;
|
I agree it would be nice to unify I/O to scrypt. The choice of utf-8 for password and bytes for salt was based on what was default on most scrypt implementations I knew of at least at the time of writing this. Also I would like to see tests for this in the example app, using the same arguments as we have already. |
|
Hi @ggozad , I'd be happy to modify the interfaces to ensure retro-compatibility or to provide other options. By the way, the example app has already been updated and tested with the I'd suggest doing Where
With such a behaviour — and using What do you think? And if you think it's a good solution, what default encoding do you want (my laziness would recommend |
|
This is very much the proper way of going about it, I will be happy to merge. I have a very busy couple of weeks, so please excuse the latency in replying :) |
- Added other encoding methods : 'legacy' which behaves like in v1.1.2, 'hex', 'base64' and 'buffer' - Update example with tests for a range of test vectors, removed Jest because it's unusable in this context (it's made for mocking native dependencies)
|
Hi @ggozad , I made the changes I proposed with a unified 'hex' strings native I/O and multiple encodings from the JS interface. I tried adding tests, but the Jest testing framework and others I have tried all boil down to the same issue : they mock native dependencies... To workaround, I made something simple and dirty : there is now a "start tests" button in the example app which executes RN-Scrypt against 23+1 test vectors (23 in UTF-8, and one non-UTF-8) that I got from SJCL and the RFC. Note that the biggest test vector cannot be executed with SJCL, it makes the JS executor crash (it is not included in SJCL's test vectors), but it works with RN Scrypt :). I updated the README.md. Tell me what you think! |
|
The other solution for testing is to configure Selenium or Appium, I didn't have the courage to do so. I know you told me you were busy, when do you think you'll be able to take a look at the PR? I have a package.json with a github URL in it rather than a clean version number :) |
|
I am sorry, I have been struck with a bad case of flu and have been out for a week now :( |
|
This is excellent work, again thank you. |
|
@tex0l I forgot to ask, could you please make another pr where you put your name/emal in the contributors and add your id to changelog? Version should be 1.2.0 in package json and all the rest. |
To solve this issue : #21