-
Notifications
You must be signed in to change notification settings - Fork 411
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
[Feature Request] Easy to sync with back end server #7
Comments
Hi, Every encrypted entry also contains an IV without that, the entry cannot be decrypted. What would |
Hi, I wanna backup the whole box, incrementally. Say I have 10 items total in the box now, after changing one item ( I wanna encrypt the user data both on client app and server, and since Hive already encrypt data, I think reuse it is a good idea. So what transferred between client app and server is NOT
Sorry that I'm not good at English. |
Okay I understand... The problem is that Hive stores objects as I think the best way is to transfer the data unencrypted over HTTPS and handle encryption on the server (maybe even with another Hive ;). You would have to sync the value, the IV and the encryption key otherwise. Edit: You can implement your sync logic using |
I got it. But encrypt and decrypt both on client and server will waste too much CPU :( I can encrypt the data to a string by myself, and save this string in hive( Do you think it is a good idea? |
Sure you can do that but unless you change the data very often I would not worry about CPU usage. The AES algorithm Hive uses is quite fast. |
Thanks @leisim I'll double think how to design my app |
Won't transferring it unencrypted leave you vulnerable for mitm attacks? |
@ThinkDigitalSoftware this is why @leisim specified transferring over HTTPS to encrypt over the channels. The encryption here is so those who have direct access to the data can not read it (such as us developers) unless trusted. |
Oh that makes sense. |
@adriancmurray what approach did you end up taking? looking to rebuild my app and it definitely needs to be offline-first so im exploring options for persistence, including hive. |
Hi,
Hive is great, and I wanna use it in a
mobile-firstoffline-first app. So I have to sync data with my back-end server silently.My app will encrypt user data and since Hive already does it, the best way is sync the encrypted string(or what ever binary format) to the server. So I need a method to get this encrypted string.
Maybe additional methods like
Future<void> putRaw(String k, String v)
andFuture<String> getRaw(String k)
are good choice?The text was updated successfully, but these errors were encountered: