Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET C# "Padding is invalid and cannot be removed." #39

Open
AlaghbariKamel opened this issue Feb 6, 2023 · 5 comments
Open

.NET C# "Padding is invalid and cannot be removed." #39

AlaghbariKamel opened this issue Feb 6, 2023 · 5 comments

Comments

@AlaghbariKamel
Copy link

System.Security.Cryptography.CryptographicException: "Padding is invalid and cannot be removed."

@mervick
Copy link
Owner

mervick commented Feb 7, 2023

Make sure that the keys you use to encrypt and decrypt are the same. The padding method even if not explicitly set should still allow for proper decryption/encryption (if not set they will be the same). However if you for some reason are using a different set of keys for decryption than used for encryption you will get this error:

  Padding is invalid and cannot be removed  

@Parinita-AA
Copy link

I see c sharp says don't use its buggy! Is it fixed?

@mervick
Copy link
Owner

mervick commented Feb 28, 2024

Where did you seen that?

@Parinita-AA
Copy link

@mervick
Copy link
Owner

mervick commented Feb 28, 2024

It's about c++, not about c sharp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants