For one of my project I need to send a POST request from Arduino (using GSM modem) to PHP web server over Internet cloud. I need to transmit userid card details to webserver for authentication.
I tried using RC4 security algo and found that Ardunio and PHP supports both - so my encryption and decryption using some dummy values went fine.
However I have a concern. Suppose my secret msg is - 'Secret'. After RC4 encryption the encrypted string contains non-readable characters - so the issue is for decryption I would not know the length of encrypted string.
Is it that if the length of input plain text is say 6 ( 'Secret' ) the output encrypted string will also always be 6?
With this assumption my encryption / decryption is working fine though in Arduino (C/C++ stack) and Web Server(PHP)?