Error shows in receiver code for RC4 decryption

MarkT:
Start by changing:
BTW RC4 is no longer considered secure - you know this?

Thank you for the comment.

:slight_smile: Yes I know that it is no longer considered as secure. Actually my intention is to implement a custom made security in the WSN communication environment. So, to implement this I am trying to go step by step from scratch. I would try this once I will be able to communicate my sensor data encrypted from one radio to another with simple encryption like RC4. But I really do appreciate your concern and suggestion. This forum is really very helpful..thank YOU!