Maybe somekind of limit on tinydb tag length? As it is not meant to store large amount of data.
Yeah that's what I was thinking as well but haven't had time to test that yet. Just gonna try segmenting the encrypted data at a smaller length.
What does encrypt
cat look like in a label ?
just testing that now, that is the problem, every time i encrypt cat with the same keys it gives me a different output?
The parts in the list view are all my attempts at encrypting the word cat.
Why would it change every time?
To encrypt a string whose length is x, you will have to generate key-pair of length 8x + c, where c > 1. (for padding)
Right ? But the generated key is 1024 and I put in the word cat so that's plenty big enough right?
I even tried with 4000 and same thing. It's all to do with the encrypted text changing each time the word is encrypted, so I can't call data from tinydb as the data changes every time. That's when I get the error when it can't find the data. If I don't encrypt the tinydb tag , it encrypts, stores and decrypt fine without error
I am sorry but I don't understand what your trying to show in your last comment?
Are you just shoeing that the encrypted data is different each time like I already mentioned?
I'd so how are you meant to use it with a database when you can't search for the same tag?
Show how you are using your procedures... encrypt and decrypt.
Also check the documentation from the first post.
They literally just call the encrypt part of the extension with the private or public key attached and the input being what it encrypts.
And yes I read the documentation from the first post before I commented. Like I said everything works fine if the tag isn't encrypted.
All I want to know is why the encrypted text changes everytime. Surely if your using the same keys everything you encrypt the same word it should output the same thing right?
My problem is I can't search for the tag in the tinydb if the encrypted data isn't constant.
Probably this is the issue. They aren't same.
Yes but why aren't they the same?
I am not sure if this is the correct answer but i have read somewhere that all the encrypted text are different but when you decrypt it , it will give the same text. Thats to maintain security.
Correct me if i am wrong.
But with that being the case how are you meant to retrieve encrypted data from a database?
Only way I can think to do it is to decrypt every tag and compare them each in turn with the searched tag. And when you have 100s of tags that is going to use a lot of resources and take a while to do so it's not exactly feasible.
You should use Symmetric Encryption then as Asymmetric Encryption can be difficult to manage.
Then i would suggest to make your own encrypt and decrypt with replace text.
Yeah I already have one, just wanted to test this one as I heard good things about it. Just a shame that it's only real use is for something like instant messaging where the data doesn't have to be stored.
Hi, we have a scenario where we have to encrypt the data on the phone and decrypt it on my laptop. I have tried to generate keys separately and use it in the app. Using the public key, I was able to encrypt the file. But, I am not able to decrypt it using the corresponding private key. If anyone has any similar implementation, can you help me out?
You can find the source code here:
It is suggested to use extension in apps only but it will work for different platforms too if you change few things in either of them.