Skip to content

Commit

Permalink
Move away from obsolete APIs (#32511)
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoK authored May 10, 2021
1 parent a1af2ed commit 9445d00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,7 @@ private Func<SymmetricAlgorithm> GetSymmetricBlockCipherAlgorithmFactory(Managed

if (configuration.EncryptionAlgorithmType == typeof(Aes))
{
Func<Aes>? 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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<IInternalCertificateXmlEncryptor>();
Expand Down

0 comments on commit 9445d00

Please sign in to comment.