I am newbie to C# and I have a task to encrypt the files in C# and put it onto server (Mentioned that use 256-bit AES encryption). Whoever wants it, they should Decrypt it first and then use it.
But I have some doubts related to it as: I am using AESCryptoServiceProvider Class. In that I am using the method CreateEncryptor(Byte[], Byte[])
. But the question I want to ask is, If I encrypt the file using key as well as IV, then I have to share the both with the user Key and IV.
What should I do in such case? I want that I should use only key at the time of encryption and decryption. How can I do that?
I am totally confused about it. Please suggest me some steps over it.
Thanks