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

Hotfix: Make HashAlgorithmType.Digest() thread-safe #1411

Merged
merged 1 commit into from
Jul 29, 2021

Conversation

dahlia
Copy link
Contributor

@dahlia dahlia commented Jul 29, 2021

As HashAlgorithm.ComputeHash() method is not guaranteed thread-safe, this patch makes HashAlgorithmType's internal HashAlgorithm instances thread-local.

Read also the following article: C# Cautionary Tale — The dangers of SHA256 reuse.

@dahlia dahlia added the bug Something isn't working label Jul 29, 2021
@dahlia dahlia self-assigned this Jul 29, 2021
@dahlia dahlia merged commit 01540f2 into planetarium:0.13-maintenance Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants