This is a basic question, but did you step through the code?
And, I hope it's a typing error when transferring the code into here but
Rijndael.CreateEncryptorcreatekey(Password), createIV(password))
won't work because you're missing a ( after
CreateEncryptor
.
And a hint...but since you're not using a Rijndael code, you should change the name of the object to something that actually identifies it as an RC2.
Step through and see if the
csCryptoStream
is created correctly. Since the creation of it is the only place that you've actually changed the code from the CP article, I would look there first. I know that the rest of the code works with Rijndael because I use it in a program.