maythamfahmi / CryptoNet

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

Fix encrypt and decrypt files with general improvement #41

Closed maythamfahmi closed 1 year ago

maythamfahmi commented 1 year ago

General enhancement.

Fix bug #40, introduce a new test to cover bug #40, and improve documentation in general.

maythamfahmi commented 1 year ago

This feature branch will fix the issue of AES encryption and decryption of files. When encrypting a file, the same decrypted file has the wrong byte length of the original one and will end up being a corrupted file.

Besides the fix, a turn of improvement is made, a unit test to cover file encryption and decryption. Adding more console examples.

The overall code and documentation will be reviewed. Comments and enhancements are welcome before merging it, hopefully, next week.

ghost commented 1 year ago

Hey @maythamfahmi! I've tested our solution using commit 1b8cacb1641ec1c1b409295123223cfb16bc7a0c. It works just fine, both for the PDF files I've tested and our unit tests. Thank you for diving further into this and your solution to the issue.

maythamfahmi commented 1 year ago

@TK-SMF thanks for your input, now it is merged to the main and released as nuget v2.3.0, I added credit to you as well.