maythamfahmi / CryptoNet

CryptoNet is simple, fast and a lightweight asymmetric and symmetric encryption library.
https://github.com/maythamfahmi/CryptoNet
MIT License
99 stars 19 forks source link

PDF file after en- and decryption would be corrupted #40

Closed maythamfahmi closed 1 year ago

maythamfahmi commented 1 year ago

When using the library to encrypt and decrypt PDF files received through an ASP.NET Core endpoint using AES, the PDF file after en- and decryption would be corrupted. I determined this was due to the byte[] being converted to a string before encryption and decryption.

Implementing the same methods without this conversion solved the issue. The existing EncryptContent and DecryptContent methods for strings were not modified.

maythamfahmi commented 1 year ago

Reviewing this issue on PR #39 by @TK-SMF.

maythamfahmi commented 1 year ago

Moved to #41