lyubo / react-native-sodium

ISC License
61 stars 46 forks source link

Clarify documentation for crypto boxes #42

Closed gebsl closed 3 years ago

gebsl commented 4 years ago

Hi @lyubo,

first of all thanks for the great library!

I was wondering why my code always crashed on iOS when I called crypto_box_easy(). After a lot of debugging I realised I had to provide my data as base64 encoded string.

Can you add this to REAMDE.md and/or to the typescript definition file? If not, can I submit a PR to do this?

I think this could help preventing other people digging through the code just to find out this prerequisite.

Thanks a lot, best regards, Gabriel

lyubo commented 4 years ago

Hi @gebsl ,

Base64 was chosen because no binary data can pass js<->native bridge in RN. At least, at the time I was involved in a RN project which was to embed some encryption functionality.

Initially there was an example application, which showed how to use this package. Later, it had been moved in a separate repository, although there's a link to that repository in the README.md.

Of course, valuable PRs are always welcome, so feel free to submit yours.

Thanks for your interest.

gebsl commented 3 years ago

Hi @lyubo,

unfortunately I couldn't use this project in the longer run as I ran into problems on another side of the project. That's why I think I won't find the time to dig into it and improve it. Therefore will close this issue.

Sorry for this and thanks a lot for your work!