Skip to content

Commit 38c0bb0

Browse files
authored
Use GetUnavailableHashAlgorithms in universal tests
Signed-off-by: Xen <lordofxen@deskasoft.com>
1 parent 62b71ea commit 38c0bb0

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

HashifyNet.UnitTests/Core/UniversalTest.cs

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -577,22 +577,6 @@ public class UniversalTest
577577
[Fact]
578578
public void RunUniversalTest()
579579
{
580-
List<Tuple<Type, bool>> possibleUnavailableAlgorithms = new List<Tuple<Type, bool>>()
581-
{
582-
Tuple.Create(typeof(IHMACSHA3_256), IHMACSHA3_256.IsSupported),
583-
Tuple.Create(typeof(IHMACSHA3_384), IHMACSHA3_384.IsSupported),
584-
Tuple.Create(typeof(IHMACSHA3_512), IHMACSHA3_512.IsSupported),
585-
586-
Tuple.Create(typeof(ISHA3_256), ISHA3_256.IsSupported),
587-
Tuple.Create(typeof(ISHA3_384), ISHA3_384.IsSupported),
588-
Tuple.Create(typeof(ISHA3_512), ISHA3_512.IsSupported),
589-
};
590-
591-
Type[] unavailableAlgorithms = possibleUnavailableAlgorithms
592-
.Where(t => !t.Item2)
593-
.Select(t => t.Item1)
594-
.ToArray();
595-
596580
IHashFunctionBase[] all = HashFactory.CreateHashAlgorithms(HashFunctionType.Cryptographic | HashFunctionType.Noncryptographic, new Dictionary<Type, IHashConfigBase>()
597581
{
598582
// Non-cryptographic Forced Defaults
@@ -604,7 +588,7 @@ public void RunUniversalTest()
604588

605589
// Cryptographic Forced Defaults
606590
{ typeof(IArgon2id), Argon2idConfig.OWASP_Standard }
607-
}, unavailableAlgorithms);
591+
}, HashFactory.GetUnavailableHashAlgorithms());
608592

609593
Assert.NotNull(all);
610594
Assert.NotEmpty(all);
@@ -714,3 +698,4 @@ public void RunUniversalTest()
714698
}
715699
}
716700

701+

0 commit comments

Comments
 (0)