search and ai stabilization work, localization stablized.
This commit is contained in:
@@ -4,6 +4,7 @@ using System;
|
||||
using System.Security.Cryptography;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using static StellaOps.Localization.T;
|
||||
|
||||
namespace StellaOps.Cryptography;
|
||||
|
||||
@@ -87,7 +88,7 @@ public sealed class EcdsaSigner : ICryptoSigner
|
||||
{ } alg when string.Equals(alg, SignatureAlgorithms.Es256, StringComparison.OrdinalIgnoreCase) => HashAlgorithmName.SHA256,
|
||||
{ } alg when string.Equals(alg, SignatureAlgorithms.Es384, StringComparison.OrdinalIgnoreCase) => HashAlgorithmName.SHA384,
|
||||
{ } alg when string.Equals(alg, SignatureAlgorithms.Es512, StringComparison.OrdinalIgnoreCase) => HashAlgorithmName.SHA512,
|
||||
_ => throw new InvalidOperationException($"Unsupported ECDSA signing algorithm '{algorithmId}'.")
|
||||
_ => throw new InvalidOperationException(_t("crypto.ecdsa.algorithm_unsupported", algorithmId))
|
||||
};
|
||||
|
||||
private static string ResolveCurve(string algorithmId)
|
||||
@@ -96,6 +97,6 @@ public sealed class EcdsaSigner : ICryptoSigner
|
||||
{ } alg when string.Equals(alg, SignatureAlgorithms.Es256, StringComparison.OrdinalIgnoreCase) => JsonWebKeyECTypes.P256,
|
||||
{ } alg when string.Equals(alg, SignatureAlgorithms.Es384, StringComparison.OrdinalIgnoreCase) => JsonWebKeyECTypes.P384,
|
||||
{ } alg when string.Equals(alg, SignatureAlgorithms.Es512, StringComparison.OrdinalIgnoreCase) => JsonWebKeyECTypes.P521,
|
||||
_ => throw new InvalidOperationException($"Unsupported ECDSA curve mapping for algorithm '{algorithmId}'.")
|
||||
_ => throw new InvalidOperationException(_t("crypto.ecdsa.curve_unsupported", algorithmId))
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user