diff --git a/src/DataProtection/DataProtection/src/AuthenticatedEncryption/ManagedAuthenticatedEncryptorFactory.cs b/src/DataProtection/DataProtection/src/AuthenticatedEncryption/ManagedAuthenticatedEncryptorFactory.cs index 12382670dbc3..d87b43557d43 100644 --- a/src/DataProtection/DataProtection/src/AuthenticatedEncryption/ManagedAuthenticatedEncryptorFactory.cs +++ b/src/DataProtection/DataProtection/src/AuthenticatedEncryption/ManagedAuthenticatedEncryptorFactory.cs @@ -96,14 +96,7 @@ private Func GetSymmetricBlockCipherAlgorithmFactory(Managed if (configuration.EncryptionAlgorithmType == typeof(Aes)) { - Func? factory = null; - if (OSVersionUtil.IsWindows()) - { - // If we're on desktop CLR and running on Windows, use the FIPS-compliant implementation. - factory = () => new AesCryptoServiceProvider(); - } - - return factory ?? Aes.Create; + return Aes.Create; } else { diff --git a/src/DataProtection/DataProtection/test/XmlEncryption/CertificateXmlEncryptionTests.cs b/src/DataProtection/DataProtection/test/XmlEncryption/CertificateXmlEncryptionTests.cs index 425e15f51cac..414f40a39cc5 100644 --- a/src/DataProtection/DataProtection/test/XmlEncryption/CertificateXmlEncryptionTests.cs +++ b/src/DataProtection/DataProtection/test/XmlEncryption/CertificateXmlEncryptionTests.cs @@ -19,7 +19,7 @@ public class CertificateXmlEncryptorTests public void Encrypt_Decrypt_RoundTrips() { // Arrange - var symmetricAlgorithm = new TripleDESCryptoServiceProvider(); + var symmetricAlgorithm = TripleDES.Create(); symmetricAlgorithm.GenerateKey(); var mockInternalEncryptor = new Mock();