Skip to content

Conversation

svick
Copy link
Contributor

@svick svick commented Dec 27, 2022

Related to dotnet/runtime#79924.

This PR deletes some outdated and duplicate samples for 3DES, modernizes the C# version of the remaining sample and removes samples from the obsolete TripleDESCryptoServiceProvider class.

Also updates the remarks of TripleDESCryptoServiceProvider to link to the TripleDES.Create method.

@svick svick requested a review from a team as a code owner December 27, 2022 12:49
@ghost ghost added community-contribution Indicates that the PR has been added by a community member area-System.Security Issues related to security practices for .NET developers. labels Dec 27, 2022
@ghost
Copy link

ghost commented Dec 27, 2022

Tagging subscribers to this area: @dotnet/area-system-security, @vcsjones
See info in area-owners.md if you want to be subscribed.

Issue Details

Related to dotnet/runtime#79924.

This PR deletes some outdated and duplicate samples for 3DES, modernizes the C# version of the remaining sample and removes samples from the obsolete TripleDESCryptoServiceProvider class.

Also updates the remarks of TripleDESCryptoServiceProvider to link to the TripleDES.Create method.

Author: svick
Assignees: -
Labels:

area-System.Security, community-contribution

Milestone: -

@learn-build-service-prod

This comment was marked as outdated.

@bartonjs
Copy link
Member

bartonjs commented Jan 4, 2023

This was already fixed in #8384. Not sure why the updated samples aren't showing up on there; but that's the structure and style that I rewrote these samples to, and would prefer to not change any of the styling.

@bartonjs bartonjs closed this Jan 4, 2023
@vcsjones
Copy link
Member

vcsjones commented Jan 4, 2023

@bartonjs I think your previous PR only addressed TripleDES. I don't see TripleDESCryptoServiceProvider in your linked PR.

@bartonjs
Copy link
Member

bartonjs commented Jan 4, 2023

In that case.. the text updates and deleting all of the examples that pertain specifically to TripleDESCryptoServiceProvider are welcome; but changing the C# 3DES example is not (because then it doesn't match the VB or CPP-CLI samples, or the AES/RC2/etc samples).

@bartonjs bartonjs reopened this Jan 4, 2023
Copy link
Member

@bartonjs bartonjs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 3DES core C# samples should remain as-is, so they are consistent across languages and similar classes.

@ghost ghost added the needs-author-action An issue or pull request that requires more info or actions from the author. label Jan 4, 2023
@learn-build-service-prod

This comment was marked as outdated.

@svick
Copy link
Contributor Author

svick commented Jan 15, 2023

@bartonjs I think that having outdated C# examples is worse than being inconsistent.

I would be fine with updating examples for other classes or for the other languages (where possible), but I really think the primary examples should demonstrate modern coding styles.

@ghost ghost removed the needs-author-action An issue or pull request that requires more info or actions from the author. label Jan 15, 2023
@gewarren gewarren added area-System.Security Issues related to security practices for .NET developers. and removed area-System.Security Issues related to security practices for .NET developers. labels Mar 5, 2024
Copy link
Contributor

@gewarren gewarren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just delete the C++ examples.

This comment was marked as outdated.

@gewarren gewarren requested a review from bartonjs April 3, 2025 19:32
Copy link

Learn Build status updates of commit 7422693:

✅ Validation status: passed

File Status Preview URL Details
snippets/cpp/VS_Snippets_CLR_Classic/classic TripleDESCryptoServiceProvider Example/CPP/source.cpp ✅Succeeded n/a (file deleted or renamed)
snippets/cpp/VS_Snippets_CLR/Cryptography.3DESCSP.CreateEncryptor.File/CPP/fileexample.cpp ✅Succeeded n/a (file deleted or renamed)
snippets/cpp/VS_Snippets_CLR/Cryptography.3DESCSP.CreateEncryptor.Memory/CPP/memoryexample.cpp ✅Succeeded n/a (file deleted or renamed)
snippets/csharp/System.Security.Cryptography/TripleDES/Overview/Project.csproj ✅Succeeded n/a (file deleted or renamed)
snippets/csharp/System.Security.Cryptography/TripleDES/Overview/source.cs ✅Succeeded n/a (file deleted or renamed)
snippets/csharp/System.Security.Cryptography/TripleDESCryptoServiceProvider/Overview/fileexample.cs ✅Succeeded n/a (file deleted or renamed)
snippets/csharp/System.Security.Cryptography/TripleDESCryptoServiceProvider/Overview/memoryexample.cs ✅Succeeded n/a (file deleted or renamed)
snippets/visualbasic/VS_Snippets_CLR_Classic/classic TripleDESCryptoServiceProvider Example/VB/source.vb ✅Succeeded n/a (file deleted or renamed)
snippets/visualbasic/VS_Snippets_CLR/Cryptography.3DES.Create.File/VB/project.csproj ✅Succeeded n/a (file deleted or renamed)
snippets/visualbasic/VS_Snippets_CLR/Cryptography.3DES.Create.File/VB/project.vbproj ✅Succeeded
snippets/visualbasic/VS_Snippets_CLR/Cryptography.3DES.Create.Memory/project.csproj ✅Succeeded n/a (file deleted or renamed)
snippets/visualbasic/VS_Snippets_CLR/Cryptography.3DES.Create.Memory/project.vbproj ✅Succeeded
snippets/visualbasic/VS_Snippets_CLR/Cryptography.3DESCSP.CreateEncryptor.File/VB/fileexample.vb ✅Succeeded n/a (file deleted or renamed)
snippets/visualbasic/VS_Snippets_CLR/Cryptography.3DESCSP.CreateEncryptor.Memory/VB/memoryexample.vb ✅Succeeded n/a (file deleted or renamed)
xml/System.Security.Cryptography/TripleDES.xml ✅Succeeded View
xml/System.Security.Cryptography/TripleDESCryptoServiceProvider.xml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

@gewarren gewarren merged commit 4855510 into dotnet:main Apr 3, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Security Issues related to security practices for .NET developers. community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants