Skip to content

[Breaking change]: RSA.EncryptValue and RSA.DecryptValue are obsolete #31614

Closed
@vcsjones

Description

@vcsjones

Description

RSA.EncryptValue and RSA.DecryptValue are obsolete with the SYSLIB0048 diagnostic code.

This obsoletion is for .NET 8 Preview 1.

Version

Other (please put exact version in description textbox)

Previous behavior

Callers could use RSA.EncryptValue or RSA.EncryptValue without a warning.

New behavior

In .NET 8, users of RSA.EncryptValue or RSA.EncryptValue will get a SYSLIB0048 compilation warning.

Type of breaking change

  • Binary incompatible: Existing binaries may encounter a breaking change in behavior, such as failure to load/execute or different run-time behavior.
  • Source incompatible: Source code may encounter a breaking change in behavior when targeting the new runtime/component/SDK, such as compile errors or different run-time behavior.

Reason for change

These APIs were never implemented and always produced a NotSupportedException. Their purpose is unclear and should not be used.

Recommended action

Callers that want to encrypt or decrypt with RSA should use Encrypt or Decrypt instead.

Feature area

Cryptography

Affected APIs

  • M:System.Security.Cryptography.RSACryptoServiceProvider.EncryptValue(System.Byte[])
  • M:System.Security.Cryptography.RSACryptoServiceProvider.DecryptValue(System.Byte[])
  • M:System.Security.Cryptography.RSA.EncryptValue(System.Byte[])
  • M:System.Security.Cryptography.RSA.DecryptValue(System.Byte[])

Associated WorkItem - 60624

Metadata

Metadata

Assignees

Labels

🏁 Release: .NET 8Work items for the .NET 8 release📌 seQUESTeredIdentifies that an issue has been imported into Quest.breaking-changeIndicates a .NET Core breaking changesource incompatibleSource code may encounter a breaking change in behavior when targeting the new version.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions