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
Obsolete RSA.EncryptValue
and RSA.DecryptValue
#76514
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @dotnet/area-system-security, @vcsjones Issue DetailsFixes #73969. namespace System.Security.Cryptography;
public partial class RSA : AsymmetricAlgorithm
{
+ [Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.")]
public virtual byte[] EncryptValue(byte[] rgb);
+ [Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.")]
public virtual byte[] DecryptValue(byte[] rgb);
}
public partial class RSACryptoServiceProvider : RSA
{
+ [Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.")]
public override byte[] EncryptValue(byte[] rgb);
+ [Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.")]
public override byte[] DecryptValue(byte[] rgb);
}
|
Is there a guideline on obsoletions? Should they theoretically be a constant in |
This should be following the SYSLIB obsoletion pattern. See another PR like #67264 as an example.
For the tests, you would want to probably surround the obsolete method calls with #pragma warning disable SYSLIB0048
rsa.EncryptValue(..);
#pragma warning restore SYSLIB0048 |
And make sure the DiagnosticId and UrlFormat is set in the |
@vcsjones Ready for re review :D |
Looks good to me, but @bartonjs will need to give the approval. |
It was on my TODO list 😄. But, now it's on my TO-DONE! list. Thanks, @deeprobin. |
Added When you commit this breaking change:
Tagging @dotnet/compat for awareness of the breaking change. |
Breaking change issue here: dotnet/docs#31614 |
Fixes #73969.