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

Decrypt method with privateKeyFilePath parameter not disposing private key stream. #21

Open
bkothe opened this issue Oct 27, 2020 · 2 comments

Comments

@bkothe
Copy link

bkothe commented Oct 27, 2020

When passing the private key file path to the Decrypt method, it does not release the key file after decryption.

Decrypt(inputStream, outputStream, File.OpenRead(privateKeyFilePath), passPhrase);

It looks as though there is probably the same issue in other methods as well where the private key file path is passed in. I didn't try it but I think in the case of async methods, the file will be released however the non-async methods don't seem to be releasing the private key file.

@Cinchoo
Copy link
Owner

Cinchoo commented Oct 30, 2020

I've looked into it. Applied fix.

New package v1.0.0.3 is pushed nuget. Try it. Thanks for reporting.

@bkothe
Copy link
Author

bkothe commented Oct 30, 2020

@Cinchoo Thanks for the quick turnaround. I will give it a whirl a bit later but the change looks good to me. Thanks again!

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

2 participants