Skip to content

Commit

Permalink
remove unused array
Browse files Browse the repository at this point in the history
  • Loading branch information
jamie-mh committed May 4, 2024
1 parent 1afa653 commit 85ee68b
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public class XChaCha20Poly1305Stream
{
private const int KeySize = 32;
private const int NonceSize = 12;
private const int PadSize = 8;
private const int InputSize = 16;
private const int InputNonceSize = 8;
private const int BlockSize = 64;
Expand All @@ -26,7 +25,6 @@ public class XChaCha20Poly1305Stream

private byte[] _key = new byte[KeySize];
private readonly byte[] _nonce = new byte[NonceSize];
private readonly byte[] _pad = new byte[PadSize];

public enum Tag
{
Expand All @@ -48,7 +46,6 @@ public void Init(byte[] key, byte[] header)
_key = hChaCha.Generate();

Array.Clear(_nonce);
Array.Clear(_pad);

Buffer.BlockCopy(header, InputSize, _nonce, sizeof(uint), InputNonceSize);
BinaryPrimitives.WriteUInt32LittleEndian(_nonce, 1);
Expand Down

0 comments on commit 85ee68b

Please sign in to comment.