RC4 encryption/ decryption

Hey guys,

So, I want to implement the RC4 encryption but everything I found online was not quite helpful. I don't understand how it works.

I have a string like s = "THIS IS A STRING" and a key k = "KEY". I found that I have to initialize an array from 0-255 and turn the key into ASCII or something like that. I get quite confused about the initialization. The guy I watched on YouTube he did an example but I got more confused.

Could anyone help me out? I just need the steps how to do it.

Thanks in advance.
This may help as well, it has code examples but they are not in C++:
https://en.wikipedia.org/wiki/RC4
Thank you guys so so much!
Topic archived. No new replies allowed.