diff --git a/src/Microsoft.AspNetCore.DataProtection/AuthenticatedEncryption/ManagedAuthenticatedEncryptorFactory.cs b/src/Microsoft.AspNetCore.DataProtection/AuthenticatedEncryption/ManagedAuthenticatedEncryptorFactory.cs index a0d7bc2226..03bd596346 100644 --- a/src/Microsoft.AspNetCore.DataProtection/AuthenticatedEncryption/ManagedAuthenticatedEncryptorFactory.cs +++ b/src/Microsoft.AspNetCore.DataProtection/AuthenticatedEncryption/ManagedAuthenticatedEncryptorFactory.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -88,13 +88,12 @@ namespace Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption if (configuration.EncryptionAlgorithmType == typeof(Aes)) { Func factory = null; -#if !NETSTANDARD1_3 if (OSVersionUtil.IsWindows()) { // If we're on desktop CLR and running on Windows, use the FIPS-compliant implementation. factory = () => new AesCryptoServiceProvider(); } -#endif + return factory ?? Aes.Create; } else