Before I start, I know there are a lot of similar questions on stackoverflow, but the majority of the answers consist of a large section of code with no explanation or help to aid the user.
What I need to do is rather simple, take a string as input from the user, then the password, then encrypt the string with the password and write the cipher text to a file. Then at a later date when the user wants, read the cipher text from the file and decrypt it and present the user with the original plain text. I can handle writing to and from the file, I just need help with the encryption of the string. (Note: I do not want to just encrypt/decrypt the whole file - as it has to contain some unencrypted stuff - just a string in the program)
Also, the 'Initialisation Vector' that is required - can it be the same as the password? Or can it be simply hard coded into the program? Is it even essential for security? If not then does the user have to remember the password and the IV?
Another thing, when the user comes to decrypt and and enters an incorrect password, do the methods in the Rijndael class just raise an error or what?
I am proficient when it comes to C# but I am new to cryptography so if you could step me through any code or answer you post I'd be most grateful.
Thanks