From db901b6db8b68ea659b86b35892ac026091f249e Mon Sep 17 00:00:00 2001 From: Oskar Dudycz Date: Wed, 8 Dec 2021 15:28:35 +0100 Subject: [PATCH] Renamed AesManaged to Aes, removed obsolete test report config --- Crypto_Shredding/.NET/CryptoShredding.sln | 5 +++++ .../CryptoShredding.IntegrationTests.csproj | 2 -- .../Serialization/EncryptorDecryptor.cs | 10 +++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Crypto_Shredding/.NET/CryptoShredding.sln b/Crypto_Shredding/.NET/CryptoShredding.sln index 7948042..045fc3e 100644 --- a/Crypto_Shredding/.NET/CryptoShredding.sln +++ b/Crypto_Shredding/.NET/CryptoShredding.sln @@ -16,6 +16,11 @@ EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CryptoShredding.IntegrationTests", "src\CryptoShredding.IntegrationTests\CryptoShredding.IntegrationTests.csproj", "{FA1C5197-1F19-4EB6-825C-08BB380283AB}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CI", "CI", "{A6E8B7C5-D5F7-4F9E-8EDD-020FEF6D18CD}" + ProjectSection(SolutionItems) = preProject + ..\..\.github\workflows\build.crypto_shredding.dotnet.yml = ..\..\.github\workflows\build.crypto_shredding.dotnet.yml + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/Crypto_Shredding/.NET/src/CryptoShredding.IntegrationTests/CryptoShredding.IntegrationTests.csproj b/Crypto_Shredding/.NET/src/CryptoShredding.IntegrationTests/CryptoShredding.IntegrationTests.csproj index a592925..3df4b5a 100644 --- a/Crypto_Shredding/.NET/src/CryptoShredding.IntegrationTests/CryptoShredding.IntegrationTests.csproj +++ b/Crypto_Shredding/.NET/src/CryptoShredding.IntegrationTests/CryptoShredding.IntegrationTests.csproj @@ -3,8 +3,6 @@ net6.0 true - trx%3bLogFileName=$(MSBuildProjectName).trx - $(MSBuildThisFileDirectory)/bin/TestResults/$(TargetFramework) diff --git a/Crypto_Shredding/.NET/src/CryptoShredding/Serialization/EncryptorDecryptor.cs b/Crypto_Shredding/.NET/src/CryptoShredding/Serialization/EncryptorDecryptor.cs index d20d666..c925941 100644 --- a/Crypto_Shredding/.NET/src/CryptoShredding/Serialization/EncryptorDecryptor.cs +++ b/Crypto_Shredding/.NET/src/CryptoShredding/Serialization/EncryptorDecryptor.cs @@ -15,8 +15,8 @@ public EncryptorDecryptor(CryptoRepository cryptoRepository) public ICryptoTransform GetEncryptor(string dataSubjectId) { var encryptionKey = _cryptoRepository.GetExistingOrNew(dataSubjectId, CreateNewEncryptionKey); - var aesManaged = GetAesManaged(encryptionKey); - var encryptor = aesManaged.CreateEncryptor(); + var aes = GetAes(encryptionKey); + var encryptor = aes.CreateEncryptor(); return encryptor; } @@ -29,8 +29,8 @@ public ICryptoTransform GetDecryptor(string dataSubjectId) return default; } - var aesManaged = GetAesManaged(encryptionKey); - var decryptor = aesManaged.CreateDecryptor(); + var aes = GetAes(encryptionKey); + var decryptor = aes.CreateDecryptor(); return decryptor; } @@ -47,7 +47,7 @@ private EncryptionKey CreateNewEncryptionKey() return encryptionKey; } - private Aes GetAesManaged(EncryptionKey encryptionKey) + private Aes GetAes(EncryptionKey encryptionKey) { var aes = Aes.Create();