Skip to content

Commit

Permalink
rename const
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-knozderko committed Nov 8, 2024
1 parent 604c27a commit 6a4412c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Snowflake.Data/Core/FileTransfer/GcmEncryptionProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ namespace Snowflake.Data.Core.FileTransfer
{
internal class GcmEncryptionProvider
{
private const int AesTagSizeInBits = 128;
internal const int TagSizeInBytes = AesTagSizeInBits / 8;
private const int TagSizeInBits = 128;
internal const int TagSizeInBytes = TagSizeInBits / 8;
private const int InitVectorSizeInBytes = 12;
private const string AesGcmNoPaddingCipher = "AES/GCM/NoPadding";

Expand Down Expand Up @@ -180,8 +180,8 @@ private static IBufferedCipher BuildAesGcmNoPaddingCipher(bool forEncryption, by
var cipher = CipherUtilities.GetCipher(AesGcmNoPaddingCipher);
KeyParameter keyParameter = new KeyParameter(keyBytes);
var keyParameterAead = aadData == null
? new AeadParameters(keyParameter, AesTagSizeInBits, initialisationVector)
: new AeadParameters(keyParameter, AesTagSizeInBits, initialisationVector, aadData);
? new AeadParameters(keyParameter, TagSizeInBits, initialisationVector)
: new AeadParameters(keyParameter, TagSizeInBits, initialisationVector, aadData);
cipher.Init(forEncryption, keyParameterAead);
return cipher;
}
Expand Down

0 comments on commit 6a4412c

Please sign in to comment.