C#: AES error: Padding is invalid and cannot be removed. Same key and everything, help
问题 I'm quite new to C# so please be patient with me. I know this question was asked a lot if times, but I couldn't find an answer to my problem. I'm saving some data and before writing it to a file I convert it to binary and store it in array, which I encrypt and then write to file. I encrypt data in chunks (32 bytes). In the same way I read data in chunks of 32 bytes and then decrypt that data and then this should repeat till the end of file. But when it comes to decryption the following error