The the app is for sending and receiving text messages needs to be able to read the incoming text message and then decrypt it. So if you receive an encrypted text message, the encrypt labels will not apply, does that make sense?
I do have a test app that can encrypt and decrypt in the one app, but it works as you are sending and receiving in the same app. With text messages, the receiver will only receive the message and will not have the encrypt field information.
Yes, I agree and the plan was to type in the salt password and then decrypt the message, but I cannot work out how to do this? I'm new to app inventor so I'm still learning how to do the blocks.
If I understand what you are trying correctly, the process should be like this:
The sender types their message, then enters the salt and secret to create the encrypted text which they send to the receiver. Here the salt is "mysalt" and the secret is "mysecret"
The receiver gets the message. In order to decrypt the message they MUST KNOW the salt and secret that the sender used. They enter these values and the message is decrypted
The plan was is to eventually attached a secret to each user that has the app, so I don't need to keep typing in the secret salt password every time and then there will be an option down the line to edit the salt password that is attached to a contact.
This is more advanced and I'm far away from that at the moment. I have the sending part working, but the receiving part seems to be harder. I can view the text message which is contained in the "get messagetext", but I've had trouble trying to take what is in message text and getting the app to ask for the salt password associated with the message and if correct, then it decrypts the message.
I hope that makes sense. Here is the full "receive" part of the app.
Use a TextInput dialog from the Notifier component to request a text from the user. This text can be the salt or the secret, then pass the response into your decrypt block.
Do I replace the block that you originally posted up with this new one that you have up now with the notifier addition?
Sorry I'm new to app inventor as I'm still learning the "buzz" words and what they mean.
Here is the latest version of the block. I've had to add (initialize global secret to " ") as a red x was coming up at the end of the AES Decryption block.