Refactor code structure and optimize performance across multiple modules

This commit is contained in:
StellaOps Bot
2025-12-26 20:03:22 +02:00
parent c786faae84
commit f10d83c444
1385 changed files with 69732 additions and 10280 deletions

View File

@@ -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");