Refactor code structure and optimize performance across multiple modules
This commit is contained in:
@@ -9,7 +9,8 @@ namespace StellaOps.Cryptography.Tests;
|
||||
|
||||
public class PolicyProvidersTests
|
||||
{
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task FipsSoft_Signs_And_Verifies_Es256()
|
||||
{
|
||||
Environment.SetEnvironmentVariable("FIPS_SOFT_ALLOWED", "1");
|
||||
@@ -32,13 +33,15 @@ public class PolicyProvidersTests
|
||||
provider.GetHasher(HashAlgorithms.Sha256).ComputeHash(data).Length.Should().Be(32);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task EidasSoft_Signs_And_Verifies_Es384()
|
||||
{
|
||||
Environment.SetEnvironmentVariable("EIDAS_SOFT_ALLOWED", "1");
|
||||
|
||||
var provider = new EidasSoftCryptoProvider();
|
||||
using var ecdsa = ECDsa.Create(ECCurve.NamedCurves.nistP384);
|
||||
using StellaOps.TestKit;
|
||||
var key = new CryptoSigningKey(
|
||||
new CryptoKeyReference("eidas-es384"),
|
||||
SignatureAlgorithms.Es384,
|
||||
@@ -55,7 +58,8 @@ public class PolicyProvidersTests
|
||||
provider.GetHasher(HashAlgorithms.Sha384).ComputeHash(data).Length.Should().Be(48);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public void KcmvpHashOnly_Computes_Hash()
|
||||
{
|
||||
Environment.SetEnvironmentVariable("KCMVP_HASH_ALLOWED", "1");
|
||||
|
||||
Reference in New Issue
Block a user