-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Correct .NET 11 RC1 libraries release notes #10570
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
Open
danroth27
wants to merge
1
commit into
main
Choose a base branch
from
release-notes/11.0-rc1-libraries-cleanup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+13
−7
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,8 +98,6 @@ The `Memory<byte>` and `ReadOnlyMemory<byte>` schemas remain non-nullable (`"typ | |
| For a union with object-shaped cases, specify the classifier on the union to select the case from its distinguishing property names: | ||
|
|
||
| ```csharp | ||
| #:property LangVersion=preview | ||
|
|
||
| using System.Text.Json; | ||
| using System.Text.Json.Serialization; | ||
|
|
||
|
|
@@ -213,17 +211,25 @@ On an Apple M1 Ultra running macOS Tahoe 26.6, encrypting a 16-byte payload with | |
|
|
||
| ## AES Key Wrap support | ||
|
|
||
| The `Aes` class now supports the unpadded AES Key Wrap algorithm defined by RFC 3394 ([dotnet/runtime #132477](https://github.com/dotnet/runtime/pull/132477)). The new `EncryptKeyWrap`, `DecryptKeyWrap`, `TryDecryptKeyWrap`, and `GetKeyWrapLength` methods complement the padded AES-KWP APIs added earlier in .NET 11. | ||
| The `Aes` class now supports the unpadded AES Key Wrap algorithm defined by RFC 3394 ([dotnet/runtime #132477](https://github.com/dotnet/runtime/pull/132477)). The new `EncryptKeyWrap`, `DecryptKeyWrap`, `TryDecryptKeyWrap`, and `GetKeyWrapLength` methods complement the padded AES-KWP APIs added in .NET 10. | ||
|
|
||
| The APIs provide array-returning and span-based overloads for wrapping cryptographic keys, including scenarios used by JOSE libraries. | ||
|
|
||
| ## Breaking changes | ||
| ```csharp | ||
| using System.Security.Cryptography; | ||
|
|
||
| ### Numeric conversions are now correctly rounded | ||
| using Aes aes = Aes.Create(); | ||
| aes.Key = RandomNumberGenerator.GetBytes(32); | ||
|
|
||
| Starting in .NET 11 Preview 7, conversions between `decimal` and binary floating-point types, and conversions from `BigInteger` to binary floating-point types, round the exact source value once to the nearest representable destination value ([dotnet/runtime #130565](https://github.com/dotnet/runtime/pull/130565), [dotnet/runtime #130566](https://github.com/dotnet/runtime/pull/130566)). The previous conversions could lose significant digits or round through an intermediate value, so existing binaries and code rebuilt with a .NET 11 Preview 7 or later SDK can produce different results. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We missed catching this breaking change note in the Preview 7 release notes as we didn't document it until RC1. Please check with @tannergooding before removing this per their comment linked there, and I too thought it was a pretty noteworthy thing to cover, albeit late. |
||
| byte[] keyToWrap = RandomNumberGenerator.GetBytes(16); | ||
| byte[] wrappedKey = aes.EncryptKeyWrap(keyToWrap); | ||
| byte[] unwrappedKey = aes.DecryptKeyWrap(wrappedKey); | ||
|
|
||
| For example, converting the `double` literal `1.23` to `decimal` now preserves the exact binary floating-point value rather than producing `1.23`. If a value is intended to be decimal, use a decimal literal such as `1.23m` instead of converting a `double` literal. Update tests and serialized expected values that relied on the previous result; there is no compatibility switch to restore the former conversion algorithms. For complete guidance, see [dotnet/docs#55743](https://github.com/dotnet/docs/issues/55743). | ||
| Console.WriteLine( | ||
| CryptographicOperations.FixedTimeEquals(keyToWrap, unwrappedKey)); | ||
| ``` | ||
|
|
||
| ## Breaking changes | ||
|
|
||
| ### HTTP metrics are observable instruments | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is correct; thanks. dotnet/runtime#130490