Skip to content

Commit 7cff962

Browse files
authored
Rename SecurityTransforms to AppleCrypto
1 parent 6271266 commit 7cff962

20 files changed

+67
-67
lines changed
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ namespace System.Security.Cryptography
88
{
99
internal static partial class ECDiffieHellmanImplementation
1010
{
11-
public sealed partial class ECDiffieHellmanSecurityTransforms : ECDiffieHellman
11+
public sealed partial class ECDiffieHellmanAppleCrypto : ECDiffieHellman
1212
{
13-
private readonly EccSecurityTransforms _ecc = new EccSecurityTransforms(typeof(ECDiffieHellman));
13+
private readonly EccAppleCrypto _ecc = new EccAppleCrypto(typeof(ECDiffieHellman));
1414

15-
public ECDiffieHellmanSecurityTransforms()
15+
public ECDiffieHellmanAppleCrypto()
1616
{
1717
base.KeySize = 521;
1818
}
1919

20-
internal ECDiffieHellmanSecurityTransforms(SafeSecKeyRefHandle publicKey)
20+
internal ECDiffieHellmanAppleCrypto(SafeSecKeyRefHandle publicKey)
2121
{
2222
KeySizeValue = _ecc.SetKeyAndGetSize(SecKeyPair.PublicOnly(publicKey));
2323
}
2424

25-
internal ECDiffieHellmanSecurityTransforms(SafeSecKeyRefHandle publicKey, SafeSecKeyRefHandle privateKey)
25+
internal ECDiffieHellmanAppleCrypto(SafeSecKeyRefHandle publicKey, SafeSecKeyRefHandle privateKey)
2626
{
2727
KeySizeValue = _ecc.SetKeyAndGetSize(SecKeyPair.PublicPrivatePair(publicKey, privateKey));
2828
}
@@ -177,10 +177,10 @@ public override byte[] DeriveRawSecretAgreement(ECDiffieHellmanPublicKey otherPa
177177

178178
private byte[]? DeriveSecretAgreement(ECDiffieHellmanPublicKey otherPartyPublicKey, IncrementalHash? hasher)
179179
{
180-
if (!(otherPartyPublicKey is ECDiffieHellmanSecurityTransformsPublicKey secTransPubKey))
180+
if (!(otherPartyPublicKey is ECDiffieHellmanAppleCryptoPublicKey secTransPubKey))
181181
{
182182
secTransPubKey =
183-
new ECDiffieHellmanSecurityTransformsPublicKey(otherPartyPublicKey.ExportParameters());
183+
new ECDiffieHellmanAppleCryptoPublicKey(otherPartyPublicKey.ExportParameters());
184184
}
185185

186186
try
@@ -244,16 +244,16 @@ public override byte[] DeriveRawSecretAgreement(ECDiffieHellmanPublicKey otherPa
244244
}
245245

246246
public override ECDiffieHellmanPublicKey PublicKey =>
247-
new ECDiffieHellmanSecurityTransformsPublicKey(ExportParameters(false));
247+
new ECDiffieHellmanAppleCryptoPublicKey(ExportParameters(false));
248248

249-
private sealed class ECDiffieHellmanSecurityTransformsPublicKey : ECDiffieHellmanPublicKey
249+
private sealed class ECDiffieHellmanAppleCryptoPublicKey : ECDiffieHellmanPublicKey
250250
{
251-
private readonly EccSecurityTransforms _ecc;
251+
private readonly EccAppleCrypto _ecc;
252252

253-
public ECDiffieHellmanSecurityTransformsPublicKey(ECParameters ecParameters)
253+
public ECDiffieHellmanAppleCryptoPublicKey(ECParameters ecParameters)
254254
{
255255
Debug.Assert(ecParameters.D == null);
256-
_ecc = new EccSecurityTransforms(typeof(ECDiffieHellmanPublicKey));
256+
_ecc = new EccAppleCrypto(typeof(ECDiffieHellmanPublicKey));
257257
_ecc.ImportParameters(ecParameters);
258258
}
259259

src/libraries/Common/src/System/Security/Cryptography/ECDsaSecurityTransforms.cs renamed to src/libraries/Common/src/System/Security/Cryptography/ECDsaAppleCrypto.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ namespace System.Security.Cryptography
99
{
1010
internal static partial class ECDsaImplementation
1111
{
12-
public sealed partial class ECDsaSecurityTransforms : ECDsa, IRuntimeAlgorithm
12+
public sealed partial class ECDsaAppleCrypto : ECDsa, IRuntimeAlgorithm
1313
{
14-
private readonly EccSecurityTransforms _ecc = new EccSecurityTransforms(typeof(ECDsa));
14+
private readonly EccAppleCrypto _ecc = new EccAppleCrypto(typeof(ECDsa));
1515

16-
public ECDsaSecurityTransforms()
16+
public ECDsaAppleCrypto()
1717
{
1818
base.KeySize = 521;
1919
}
2020

21-
internal ECDsaSecurityTransforms(SafeSecKeyRefHandle publicKey)
21+
internal ECDsaAppleCrypto(SafeSecKeyRefHandle publicKey)
2222
{
2323
KeySizeValue = _ecc.SetKeyAndGetSize(SecKeyPair.PublicOnly(publicKey));
2424
}
2525

26-
internal ECDsaSecurityTransforms(SafeSecKeyRefHandle publicKey, SafeSecKeyRefHandle privateKey)
26+
internal ECDsaAppleCrypto(SafeSecKeyRefHandle publicKey, SafeSecKeyRefHandle privateKey)
2727
{
2828
KeySizeValue = _ecc.SetKeyAndGetSize(SecKeyPair.PublicPrivatePair(publicKey, privateKey));
2929
}

src/libraries/Common/src/System/Security/Cryptography/EccSecurityTransforms.cs renamed to src/libraries/Common/src/System/Security/Cryptography/EccAppleCrypto.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010

1111
namespace System.Security.Cryptography
1212
{
13-
internal sealed partial class EccSecurityTransforms : IDisposable
13+
internal sealed partial class EccAppleCrypto : IDisposable
1414
{
1515
private SecKeyPair? _keys;
1616
private bool _disposed;
1717
private readonly Type _disposedType;
1818

19-
internal EccSecurityTransforms(Type disposedType)
19+
internal EccAppleCrypto(Type disposedType)
2020
{
2121
Debug.Assert(disposedType != null);
2222
_disposedType = disposedType;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace System.Security.Cryptography
1212
{
13-
internal sealed partial class EccSecurityTransforms
13+
internal sealed partial class EccAppleCrypto
1414
{
1515
#pragma warning disable IDE0060
1616
private static ECParameters ExportParametersFromLegacyKey(SecKeyPair keys, bool includePrivateParameters)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace System.Security.Cryptography
1212
{
13-
internal sealed partial class EccSecurityTransforms
13+
internal sealed partial class EccAppleCrypto
1414
{
1515
private static ECParameters ExportParametersFromLegacyKey(SecKeyPair keys, bool includePrivateParameters)
1616
{

src/libraries/Common/src/System/Security/Cryptography/RSASecurityTransforms.cs renamed to src/libraries/Common/src/System/Security/Cryptography/RSAAppleCrypto.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace System.Security.Cryptography
1414
{
1515
internal static partial class RSAImplementation
1616
{
17-
public sealed partial class RSASecurityTransforms : RSA, IRuntimeAlgorithm
17+
public sealed partial class RSAAppleCrypto : RSA, IRuntimeAlgorithm
1818
{
1919
private SecKeyPair? _keys;
2020

@@ -24,22 +24,22 @@ public sealed partial class RSASecurityTransforms : RSA, IRuntimeAlgorithm
2424
// 8192 generated successfully, 8192+8 produced errSecParam.
2525
private static readonly KeySizes s_legalKeySize = new KeySizes(minSize: 1024, maxSize: 8192, skipSize: 8);
2626

27-
public RSASecurityTransforms()
27+
public RSAAppleCrypto()
2828
: this(2048)
2929
{
3030
}
3131

32-
public RSASecurityTransforms(int keySize)
32+
public RSAAppleCrypto(int keySize)
3333
{
3434
base.KeySize = keySize;
3535
}
3636

37-
internal RSASecurityTransforms(SafeSecKeyRefHandle publicKey)
37+
internal RSAAppleCrypto(SafeSecKeyRefHandle publicKey)
3838
{
3939
SetKey(SecKeyPair.PublicOnly(publicKey));
4040
}
4141

42-
internal RSASecurityTransforms(SafeSecKeyRefHandle publicKey, SafeSecKeyRefHandle privateKey)
42+
internal RSAAppleCrypto(SafeSecKeyRefHandle publicKey, SafeSecKeyRefHandle privateKey)
4343
{
4444
SetKey(SecKeyPair.PublicPrivatePair(publicKey, privateKey));
4545
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace System.Security.Cryptography
1515
{
1616
internal static partial class RSAImplementation
1717
{
18-
public sealed partial class RSASecurityTransforms
18+
public sealed partial class RSAAppleCrypto
1919
{
2020
#pragma warning disable IDE0060
2121
private static RSAParameters ExportParametersFromLegacyKey(SecKeyPair keys, bool includePrivateParameters)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace System.Security.Cryptography
1515
{
1616
internal static partial class RSAImplementation
1717
{
18-
public sealed partial class RSASecurityTransforms : RSA
18+
public sealed partial class RSAAppleCrypto : RSA
1919
{
2020
private static RSAParameters ExportParametersFromLegacyKey(SecKeyPair keys, bool includePrivateParameters)
2121
{

src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,22 +1364,22 @@
13641364
Link="Common\Microsoft\Win32\SafeHandles\SafeCreateHandle.OSX.cs" />
13651365
<Compile Include="$(CommonPath)System\Security\Cryptography\CompositeMLDsaImplementation.NotSupported.cs"
13661366
Link="Common\System\Security\Cryptography\CompositeMLDsaImplementation.NotSupported.cs" />
1367-
<Compile Include="$(CommonPath)System\Security\Cryptography\EccSecurityTransforms.cs"
1368-
Link="Common\System\Security\Cryptography\EccSecurityTransforms.cs" />
1367+
<Compile Include="$(CommonPath)System\Security\Cryptography\EccAppleCrypto.cs"
1368+
Link="Common\System\Security\Cryptography\EccAppleCrypto.cs" />
13691369
<Compile Include="$(CommonPath)System\Security\Cryptography\ECDiffieHellmanDerivation.cs"
13701370
Link="Common\System\Security\Cryptography\ECDiffieHellmanDerivation.cs" />
1371-
<Compile Include="$(CommonPath)System\Security\Cryptography\ECDiffieHellmanSecurityTransforms.cs"
1372-
Link="Common\System\Security\Cryptography\ECDiffieHellmanSecurityTransforms.cs" />
1373-
<Compile Include="$(CommonPath)System\Security\Cryptography\ECDsaSecurityTransforms.cs"
1374-
Link="Common\System\Security\Cryptography\ECDsaSecurityTransforms.cs" />
1371+
<Compile Include="$(CommonPath)System\Security\Cryptography\ECDiffieHellmanAppleCrypto.cs"
1372+
Link="Common\System\Security\Cryptography\ECDiffieHellmanAppleCrypto.cs" />
1373+
<Compile Include="$(CommonPath)System\Security\Cryptography\ECDsaAppleCrypto.cs"
1374+
Link="Common\System\Security\Cryptography\ECDsaAppleCrypto.cs" />
13751375
<Compile Include="$(CommonPath)System\Security\Cryptography\MLDsaImplementation.NotSupported.cs"
13761376
Link="Common\System\Security\Cryptography\MLDsaImplementation.NotSupported.cs" />
13771377
<Compile Include="$(CommonPath)System\Security\Cryptography\MLKemImplementation.cs"
13781378
Link="Common\System\Security\Cryptography\MLKemImplementation.cs" />
13791379
<Compile Include="$(CommonPath)System\Security\Cryptography\MLKemImplementation.NotSupported.cs"
13801380
Link="Common\System\Security\Cryptography\MLKemImplementation.NotSupported.cs" />
1381-
<Compile Include="$(CommonPath)System\Security\Cryptography\RSASecurityTransforms.cs"
1382-
Link="Common\System\Security\Cryptography\RSASecurityTransforms.cs" />
1381+
<Compile Include="$(CommonPath)System\Security\Cryptography\RSAAppleCrypto.cs"
1382+
Link="Common\System\Security\Cryptography\RSAAppleCrypto.cs" />
13831383
<Compile Include="$(CommonPath)System\Security\Cryptography\SlhDsaImplementation.NotSupported.cs"
13841384
Link="Common\System\Security\Cryptography\SlhDsaImplementation.NotSupported.cs" />
13851385
<Compile Include="$(CommonPath)System\Security\Cryptography\SP800108HmacCounterKdfImplementationManaged.cs"
@@ -1400,8 +1400,8 @@
14001400
<Compile Include="System\Security\Cryptography\CspKeyContainerInfo.NotSupported.cs" />
14011401
<Compile Include="System\Security\Cryptography\DESCryptoServiceProvider.Unix.cs" />
14021402
<Compile Include="System\Security\Cryptography\DesImplementation.Apple.cs" />
1403-
<Compile Include="System\Security\Cryptography\ECDiffieHellman.Create.SecurityTransforms.cs" />
1404-
<Compile Include="System\Security\Cryptography\ECDsa.Create.SecurityTransforms.cs" />
1403+
<Compile Include="System\Security\Cryptography\ECDiffieHellman.Create.AppleCrypto.cs" />
1404+
<Compile Include="System\Security\Cryptography\ECDsa.Create.AppleCrypto.cs" />
14051405
<Compile Include="System\Security\Cryptography\HashAlgorithmNames.Apple.cs" />
14061406
<Compile Include="System\Security\Cryptography\HashProviderDispenser.Apple.cs" />
14071407
<Compile Include="System\Security\Cryptography\HKDF.Managed.cs" />
@@ -1416,7 +1416,7 @@
14161416
<Compile Include="System\Security\Cryptography\RandomNumberGeneratorImplementation.Apple.cs" />
14171417
<Compile Include="System\Security\Cryptography\RC2CryptoServiceProvider.Unix.cs" />
14181418
<Compile Include="System\Security\Cryptography\RC2Implementation.Apple.cs" />
1419-
<Compile Include="System\Security\Cryptography\RSA.Create.SecurityTransforms.cs" />
1419+
<Compile Include="System\Security\Cryptography\RSA.Create.AppleCrypto.cs" />
14201420
<Compile Include="System\Security\Cryptography\RSACryptoServiceProvider.Unix.cs" />
14211421
<Compile Include="System\Security\Cryptography\Shake128.NonWindows.cs" />
14221422
<Compile Include="System\Security\Cryptography\Shake256.NonWindows.cs" />
@@ -1450,10 +1450,10 @@
14501450
Link="Common\Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.SecKeyRef.macOS.cs" />
14511451
<Compile Include="$(CommonPath)Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.X509.macOS.cs"
14521452
Link="Common\Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.X509.macOS.cs" />
1453-
<Compile Include="$(CommonPath)System\Security\Cryptography\EccSecurityTransforms.macOS.cs"
1454-
Link="Common\System\Security\Cryptography\EccSecurityTransforms.macOS.cs" />
1455-
<Compile Include="$(CommonPath)System\Security\Cryptography\RSASecurityTransforms.macOS.cs"
1456-
Link="Common\System\Security\Cryptography\RSASecurityTransforms.macOS.cs" />
1453+
<Compile Include="$(CommonPath)System\Security\Cryptography\EccAppleCrypto.macOS.cs"
1454+
Link="Common\System\Security\Cryptography\EccAppleCrypto.macOS.cs" />
1455+
<Compile Include="$(CommonPath)System\Security\Cryptography\RSAAppleCrypto.macOS.cs"
1456+
Link="Common\System\Security\Cryptography\RSAAppleCrypto.macOS.cs" />
14571457
<Compile Include="System\Security\Cryptography\AesCcm.NotSupported.cs" />
14581458
<Compile Include="System\Security\Cryptography\DSA.Create.NotSupported.cs" />
14591459
<Compile Include="System\Security\Cryptography\DSACryptoServiceProvider.Unix.cs" />
@@ -1475,10 +1475,10 @@
14751475
Link="Common\Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.Keychain.iOS.cs" />
14761476
<Compile Include="$(CommonPath)Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.X509.iOS.cs"
14771477
Link="Common\Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.X509.iOS.cs" />
1478-
<Compile Include="$(CommonPath)System\Security\Cryptography\EccSecurityTransforms.iOS.cs"
1479-
Link="Common\System\Security\Cryptography\EccSecurityTransforms.iOS.cs" />
1480-
<Compile Include="$(CommonPath)System\Security\Cryptography\RSASecurityTransforms.iOS.cs"
1481-
Link="Common\System\Security\Cryptography\RSASecurityTransforms.iOS.cs" />
1478+
<Compile Include="$(CommonPath)System\Security\Cryptography\EccAppleCrypto.iOS.cs"
1479+
Link="Common\System\Security\Cryptography\EccAppleCrypto.iOS.cs" />
1480+
<Compile Include="$(CommonPath)System\Security\Cryptography\RSAAppleCrypto.iOS.cs"
1481+
Link="Common\System\Security\Cryptography\RSAAppleCrypto.iOS.cs" />
14821482
<Compile Include="System\Security\Cryptography\AesCcm.NotSupported.cs" />
14831483
<Compile Include="System\Security\Cryptography\DSA.Create.NotSupported.cs" />
14841484
<Compile Include="System\Security\Cryptography\DSACryptoServiceProvider.NotSupported.cs" />
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public abstract partial class ECDiffieHellman : ECAlgorithm
77
{
88
public static new partial ECDiffieHellman Create()
99
{
10-
return new ECDiffieHellmanImplementation.ECDiffieHellmanSecurityTransforms();
10+
return new ECDiffieHellmanImplementation.ECDiffieHellmanAppleCrypto();
1111
}
1212

1313
public static partial ECDiffieHellman Create(ECCurve curve)

0 commit comments

Comments
 (0)