Skip to content

Commit b782a58

Browse files
authored
Remove "Instance" access
Signed-off-by: Xen <lordofxen@deskasoft.com>
1 parent c9b59f9 commit b782a58

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

HashifyNet/Algorithms/Argon2id/IsopohImplementation/Argon2/Argon2.Blake2BLong.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private static void Blake2BLong(byte[] hash, byte[] inputBuffer, SecureArrayCall
3838
HashSizeInBits = hash.Length > 64 ? 512 : hash.Length * 8,
3939
};
4040
Store32(outputLengthBytes, hash.Length);
41-
var blakeHash = HashFactory<IBlake2B, IBlake2BConfig>.Instance.Create(blake2BConfig);
41+
var blakeHash = HashFactory<IBlake2B, IBlake2BConfig>.Create(blake2BConfig);
4242
var transformer = blakeHash.CreateBlockTransformer();
4343
{
4444
if (outputLengthBytes != null && outputLengthBytes.Length > 0)
@@ -72,7 +72,7 @@ private static void Blake2BLong(byte[] hash, byte[] inputBuffer, SecureArrayCall
7272
while (pos < lastHashIndex)
7373
{
7474
Array.Copy(intermediateHash.Buffer, toHash.Buffer, intermediateHash.Buffer.Length); // set toHash to be the previous hash
75-
var hv = HashFactory<IBlake2B, IBlake2BConfig>.Instance.Create(blake2BConfig).ComputeHash(toHash.Buffer);
75+
var hv = HashFactory<IBlake2B, IBlake2BConfig>.Create(blake2BConfig).ComputeHash(toHash.Buffer);
7676
Array.Copy(hv.Hash, intermediateHash.Buffer, hv.Hash.Length);
7777

7878
Array.Copy(intermediateHash.Buffer, 0, hash, pos, b2B2); // copy half hash result
@@ -91,12 +91,13 @@ private static void Blake2BLong(byte[] hash, byte[] inputBuffer, SecureArrayCall
9191
}
9292

9393
{
94-
var hv = HashFactory<IBlake2B, IBlake2BConfig>.Instance.Create(blake2BConfig).ComputeHash(toHash.Buffer);
94+
var hv = HashFactory<IBlake2B, IBlake2BConfig>.Create(blake2BConfig).ComputeHash(toHash.Buffer);
9595
Array.Copy(hv.Hash, intermediateHash.Buffer, hv.Hash.Length);
9696
}
9797
Array.Copy(intermediateHash.Buffer, 0, hash, pos, hash.Length - pos); // copy the final bytes from the first part of the hash result
9898
}
9999
}
100100
}
101101
}
102-
}
102+
103+
}

0 commit comments

Comments
 (0)