Skip to content

Commit

Permalink
Simplify platform attribute for AesGcm and ChaCha20Poly1305 (#105547)
Browse files Browse the repository at this point in the history
Follow-up to #105409, I verified the analyzer works correctly with just having the annotation for iOS.
  • Loading branch information
akoeplinger authored Jul 26, 2024
1 parent eb765b7 commit 9d7551e
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ private static ref readonly byte GetSwiftRef(ReadOnlySpan<byte> b)
[UnsupportedOSPlatform("tvos")]
[SupportedOSPlatform("ios13.0")]
[SupportedOSPlatform("tvos13.0")]
[SupportedOSPlatform("maccatalyst")]
internal static unsafe void ChaCha20Poly1305Encrypt(
ReadOnlySpan<byte> key,
ReadOnlySpan<byte> nonce,
Expand Down Expand Up @@ -70,7 +69,6 @@ internal static unsafe void ChaCha20Poly1305Encrypt(
[UnsupportedOSPlatform("tvos")]
[SupportedOSPlatform("ios13.0")]
[SupportedOSPlatform("tvos13.0")]
[SupportedOSPlatform("maccatalyst")]
internal static unsafe void ChaCha20Poly1305Decrypt(
ReadOnlySpan<byte> key,
ReadOnlySpan<byte> nonce,
Expand Down Expand Up @@ -115,7 +113,6 @@ internal static unsafe void ChaCha20Poly1305Decrypt(
[UnsupportedOSPlatform("tvos")]
[SupportedOSPlatform("ios13.0")]
[SupportedOSPlatform("tvos13.0")]
[SupportedOSPlatform("maccatalyst")]
internal static unsafe void AesGcmEncrypt(
ReadOnlySpan<byte> key,
ReadOnlySpan<byte> nonce,
Expand Down Expand Up @@ -153,7 +150,6 @@ internal static unsafe void AesGcmEncrypt(
[UnsupportedOSPlatform("tvos")]
[SupportedOSPlatform("ios13.0")]
[SupportedOSPlatform("tvos13.0")]
[SupportedOSPlatform("maccatalyst")]
internal static unsafe void AesGcmDecrypt(
ReadOnlySpan<byte> key,
ReadOnlySpan<byte> nonce,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ public override void GenerateKey() { }
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
[System.Runtime.Versioning.SupportedOSPlatform("ios13.0")]
[System.Runtime.Versioning.SupportedOSPlatform("tvos13.0")]
[System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")]
public sealed partial class AesGcm : System.IDisposable
{
[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}")]
Expand Down Expand Up @@ -289,7 +288,6 @@ public AuthenticationTagMismatchException(string? message, System.Exception? inn
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
[System.Runtime.Versioning.SupportedOSPlatform("ios13.0")]
[System.Runtime.Versioning.SupportedOSPlatform("tvos13.0")]
[System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")]
public sealed partial class ChaCha20Poly1305 : System.IDisposable
{
public ChaCha20Poly1305(byte[] key) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ namespace System.Security.Cryptography
[UnsupportedOSPlatform("tvos")]
[SupportedOSPlatform("ios13.0")]
[SupportedOSPlatform("tvos13.0")]
[SupportedOSPlatform("maccatalyst")]
public sealed partial class AesGcm : IDisposable
{
private const int NonceSize = 12;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ namespace System.Security.Cryptography
[UnsupportedOSPlatform("tvos")]
[SupportedOSPlatform("ios13.0")]
[SupportedOSPlatform("tvos13.0")]
[SupportedOSPlatform("maccatalyst")]
public sealed partial class ChaCha20Poly1305 : IDisposable
{
// Per https://tools.ietf.org/html/rfc7539, ChaCha20Poly1305 AEAD requires a 256-bit key and 96-bit nonce,
Expand Down

0 comments on commit 9d7551e

Please sign in to comment.