Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • The “Padding is invalid and cannot be removed” is shown on the console when I run this program, I know that the encryption is successful (I see it encrypted when it moves through the server) but when I try to Decrypt it writes the exception. @dbugger Commented Mar 6, 2017 at 18:04
  • There is an awful lot wrong with this code - you need to Dispose the Disposable for instance. The way you get a key from a password is very weak. Also there is a FlushFinalBlock() that you never call, and it is better to get the array from a MemoryStream after you close it. Commented Mar 6, 2017 at 20:57
  • So go look for a good working example. Commented Mar 6, 2017 at 20:57