diff --git a/Snowflake.Data/Core/FileTransfer/GcmEncryptionProvider.cs b/Snowflake.Data/Core/FileTransfer/GcmEncryptionProvider.cs index f432bb552..e60eccba1 100644 --- a/Snowflake.Data/Core/FileTransfer/GcmEncryptionProvider.cs +++ b/Snowflake.Data/Core/FileTransfer/GcmEncryptionProvider.cs @@ -4,6 +4,7 @@ using Org.BouncyCastle.Crypto.IO; using Org.BouncyCastle.Crypto.Parameters; using Org.BouncyCastle.Security; +using Snowflake.Data.Log; namespace Snowflake.Data.Core.FileTransfer { @@ -13,6 +14,8 @@ internal class GcmEncryptionProvider internal const int BlockSizeInBytes = AesBlockSize / 8; private const string AesGcmNoPaddingCipher = "AES/GCM/NoPadding"; + private static readonly SFLogger s_logger = SFLoggerFactory.GetLogger(); + private static readonly SecureRandom s_random = SecureRandom.GetInstance("SHA1PRNG"); public static Stream EncryptFile( @@ -52,7 +55,7 @@ public static Stream Encrypt( { byte[] decodedMasterKey = Convert.FromBase64String(encryptionMaterial.queryStageMasterKey); int masterKeySize = decodedMasterKey.Length; - // s_logger.Debug($"Master key size : {masterKeySize}"); + s_logger.Debug($"Master key size : {masterKeySize}"); var contentIV = new byte[BlockSizeInBytes]; var keyIV = new byte[BlockSizeInBytes];