For an upcoming blog post I needed to decrypt some data using the rc4 algorithm. I wanted to do this with PowerShell but sadly PowerShell and the .NET framework have no functions for it.

File:RC4.svg

So I needed to implement it (download at the bottom of the post):

And here is a usage example (the BinToHex and HexToBin functions are from my previous blog).

rc4.zip (8720 downloads )