ghbutton / react-native-simple-crypto

A simpler React-Native crypto library
https://www.npmjs.com/package/react-native-simple-crypto
MIT License
42 stars 25 forks source link

Working with Files #43

Open mschez opened 2 years ago

mschez commented 2 years ago

Hello,

How can I use this library to encrypt and decrypt files? Usually, the approach to working with files is reading the file chunk by chunk updating the cipher, and closing it when the file is complete, but I didn't see anything in the README or implementation. Do you have some examples?

Thank you in advance!

ghbutton commented 2 years ago

I am not sure which algorithms can work in chunks and which need the entire file to do encryption. The brute force way is to load the entire file into memory and use it like a string or something. If it is binary data you will need to use something like Base64 I think.

ghbutton commented 2 years ago

How large are these file?