C# Cryptography - Encrypting a bunch of bytes
C# has some pretty brilliant encryption classes built in. For a recent project, i needed to store a password in clear text (it needs to be passed onto another system) and i figured i didn't want to be storing it in a settings file without being encrypted. Of course, anyone who decompiles the executable of my program can figure out how to decrypt it, but it's better than nothing.
So here's the code: