Skip to content

Commit

Permalink
add logger
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-knozderko committed Oct 21, 2024
1 parent a2253d0 commit 5ea1cac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Snowflake.Data/Core/FileTransfer/GcmEncryptionProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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<GcmEncryptionProvider>();

private static readonly SecureRandom s_random = SecureRandom.GetInstance("SHA1PRNG");

public static Stream EncryptFile(
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 5ea1cac

Please sign in to comment.