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

*CNG crypto algorithms missing from CNG library #25044

Closed
ericstj opened this issue Feb 14, 2018 · 6 comments
Closed

*CNG crypto algorithms missing from CNG library #25044

ericstj opened this issue Feb 14, 2018 · 6 comments

Comments

@ericstj
Copy link
Member

ericstj commented Feb 14, 2018

I was looking at porting some code targeting desktop and came across SHA256Cng which I noticed was missing.

I did a diff and I see we're actually missing a number of Cng algorithms:

  • MD5Cng
  • SHA1Cng
  • SHA256Cng
  • SHA384Cng
  • SHA512Cng

Moreover, I see quite a few more here: https://github.com/dotnet/corefx/blob/5edf66e4f35eca3ba409cb2e31154fb6a59bd4b3/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/CryptoConfig.cs#L266-L284

Any reason we left these out? /cc @bartonjs

@bartonjs
Copy link
Member

bartonjs commented Feb 14, 2018

We discourage people from caring what their digest provider is, and on core they can't actually control it. (SHA256CryptoServiceProvider just wraps SHA256.Create()).

Since the types were not part of netstandard20, we don't want them in Core.

@ericstj
Copy link
Member Author

ericstj commented Feb 14, 2018

I see, we could have put them in the Microsoft.Windows.Compatibility package. I'll make sure to adjust the code to call the Create method instead of trying to new up the specific type.

@danmoseley
Copy link
Member

Putting in the WPF/Winforms "project" as blocked (as no plan currently), just so this can be found in future.

@3vi1
Copy link

3vi1 commented Aug 10, 2019

So what's the recommended path-forward here? Everyone that used this library rewrites their module to use SHA256.Create()?

@bartonjs
Copy link
Member

So what's the recommended path-forward here? Everyone that used this library rewrites their module to use SHA256.Create()?

Yep.

@bartonjs
Copy link
Member

Since the current plan is that not having these types is correct, and we're being more aggressive about trimming things lately, I'm closing this issue.

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 5.0 milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants