Skip to content

Commit 9d7551e

Browse files
authored
Simplify platform attribute for AesGcm and ChaCha20Poly1305 (#105547)
Follow-up to #105409, I verified the analyzer works correctly with just having the annotation for iOS.
1 parent eb765b7 commit 9d7551e

File tree

4 files changed

+0
-8
lines changed

4 files changed

+0
-8
lines changed

src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Aead.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ private static ref readonly byte GetSwiftRef(ReadOnlySpan<byte> b)
3232
[UnsupportedOSPlatform("tvos")]
3333
[SupportedOSPlatform("ios13.0")]
3434
[SupportedOSPlatform("tvos13.0")]
35-
[SupportedOSPlatform("maccatalyst")]
3635
internal static unsafe void ChaCha20Poly1305Encrypt(
3736
ReadOnlySpan<byte> key,
3837
ReadOnlySpan<byte> nonce,
@@ -70,7 +69,6 @@ internal static unsafe void ChaCha20Poly1305Encrypt(
7069
[UnsupportedOSPlatform("tvos")]
7170
[SupportedOSPlatform("ios13.0")]
7271
[SupportedOSPlatform("tvos13.0")]
73-
[SupportedOSPlatform("maccatalyst")]
7472
internal static unsafe void ChaCha20Poly1305Decrypt(
7573
ReadOnlySpan<byte> key,
7674
ReadOnlySpan<byte> nonce,
@@ -115,7 +113,6 @@ internal static unsafe void ChaCha20Poly1305Decrypt(
115113
[UnsupportedOSPlatform("tvos")]
116114
[SupportedOSPlatform("ios13.0")]
117115
[SupportedOSPlatform("tvos13.0")]
118-
[SupportedOSPlatform("maccatalyst")]
119116
internal static unsafe void AesGcmEncrypt(
120117
ReadOnlySpan<byte> key,
121118
ReadOnlySpan<byte> nonce,
@@ -153,7 +150,6 @@ internal static unsafe void AesGcmEncrypt(
153150
[UnsupportedOSPlatform("tvos")]
154151
[SupportedOSPlatform("ios13.0")]
155152
[SupportedOSPlatform("tvos13.0")]
156-
[SupportedOSPlatform("maccatalyst")]
157153
internal static unsafe void AesGcmDecrypt(
158154
ReadOnlySpan<byte> key,
159155
ReadOnlySpan<byte> nonce,

src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ public override void GenerateKey() { }
123123
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
124124
[System.Runtime.Versioning.SupportedOSPlatform("ios13.0")]
125125
[System.Runtime.Versioning.SupportedOSPlatform("tvos13.0")]
126-
[System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")]
127126
public sealed partial class AesGcm : System.IDisposable
128127
{
129128
[System.ObsoleteAttribute("AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.", DiagnosticId="SYSLIB0053", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
@@ -289,7 +288,6 @@ public AuthenticationTagMismatchException(string? message, System.Exception? inn
289288
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
290289
[System.Runtime.Versioning.SupportedOSPlatform("ios13.0")]
291290
[System.Runtime.Versioning.SupportedOSPlatform("tvos13.0")]
292-
[System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")]
293291
public sealed partial class ChaCha20Poly1305 : System.IDisposable
294292
{
295293
public ChaCha20Poly1305(byte[] key) { }

src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesGcm.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ namespace System.Security.Cryptography
1212
[UnsupportedOSPlatform("tvos")]
1313
[SupportedOSPlatform("ios13.0")]
1414
[SupportedOSPlatform("tvos13.0")]
15-
[SupportedOSPlatform("maccatalyst")]
1615
public sealed partial class AesGcm : IDisposable
1716
{
1817
private const int NonceSize = 12;

src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ChaCha20Poly1305.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ namespace System.Security.Cryptography
1111
[UnsupportedOSPlatform("tvos")]
1212
[SupportedOSPlatform("ios13.0")]
1313
[SupportedOSPlatform("tvos13.0")]
14-
[SupportedOSPlatform("maccatalyst")]
1514
public sealed partial class ChaCha20Poly1305 : IDisposable
1615
{
1716
// Per https://tools.ietf.org/html/rfc7539, ChaCha20Poly1305 AEAD requires a 256-bit key and 96-bit nonce,

0 commit comments

Comments
 (0)