Encrypt data and decrypt it in a chat

Encrypt data and decrypt it in a chat.
Good morning everyone.
Please

Please, in my chat I would like to insert the possibility of encrypting the text when sending the data and decrypting it upon receipt, while I think it is not difficult to encrypt it upon sending, (I will try) it is difficult for me to understand how to decrypt it upon arrival and enter it in the display listwiev.
In fact, the listwiev inserts the data communicated by receiving it from the still encrypted Cloud DB.
I really wouldn't know where to start.

Can you help me?

See here:

https://puravidaapps.com/aes.php

or

You may also want to look at using SimpleCrypto with javascript. Below an example of it in use for a login system:

(Note: the cipher offered by @Luis_Azuaga is encoding, not encryption.)

1 Like

Tima12, thanks but I'm already struggling to understand how to use [Luis_Azuaga]'s encryption, imagine understanding something with the others, with Luis' data, I managed to encrypt the text to send in a chat, and I'm interested in how I can decrypt the incoming data in the listwiev in the remote app. I just need this.
Anyway thanks for the suggestions that I will definitely try to use, but I find it very very difficult for me.

  1. Create some data / text
  2. Encode it with cipher
  3. Store encoded data in cloudDB
  4. Retrieve encoded data from cloudDB
  5. Decode it with cipher
  6. Add to listview / list

All users of the app will need to be using the same two search and encoding patterns

1 Like

Up to point 4 I don't think I have any problems.
But the app that receives the data, receives it in a textbox.Username.text
I tried to decrypt them, but GotValue and DataChanged load data from encrypted Cloudb and put it in listwiev before I can decrypt it.

Do this ?

image

I try them immediately, incredible that it was so simple.
I'll tell you shortly.


Nothing to do I tried different ways but it keeps giving the same error.

Yes, it won't be able to decode the entire list. Try something like this:

I should say, unless you limit the chatlist to a certain number of entries, your app will become slower and slower as more data is added. You should consider methods to only return the latest entries made....

Did I do something wrong?
Because absolutely nothing happens.
The text is not transferred either.`

Yes

image

You need to encode here.....

Ho corretto gli erori.

Also

You create your list of decoded items in a local variable, then set the listview elements to a global variable that is an empty list....

Focus, take you time, and test things each step of the way

Ho corretto e funziona alla grande grazie e scusami.

See blocks above

Start there, get that working, then build up your app.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.