diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaFactoryTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaFactoryTests.cs index 348eb9e1de2b79..3647fbf53ec5fa 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaFactoryTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaFactoryTests.cs @@ -437,7 +437,7 @@ public static void ArgumentValidation_MalformedAsnEncoding() static void AssertThrows(byte[] encodedBytes) { - CompositeMLDsaTestHelpers.AssertImportSubjectKeyPublicInfo( + CompositeMLDsaTestHelpers.AssertImportSubjectPublicKeyInfo( import => Assert.Throws(() => import(encodedBytes)), import => AssertThrowIfNotSupported(() => Assert.Throws(() => import(encodedBytes)))); @@ -457,7 +457,7 @@ public static void ImportSpki_BerEncoding() byte[] spki = CompositeMLDsaTestData.GetIetfTestVector(CompositeMLDsaAlgorithm.MLDsa65WithECDsaP384).Spki; byte[] berSpki = AsnUtils.ConvertDerToNonDerBer(spki); - CompositeMLDsaTestHelpers.AssertImportSubjectKeyPublicInfo(import => + CompositeMLDsaTestHelpers.AssertImportSubjectPublicKeyInfo(import => AssertThrowIfNotSupported(() => Assert.Throws(() => import(berSpki)))); } @@ -474,7 +474,7 @@ public static void Import_WrongAsnType() algorithmIdentifier.Encode(writer); byte[] wrongAsnType = writer.Encode(); - CompositeMLDsaTestHelpers.AssertImportSubjectKeyPublicInfo( + CompositeMLDsaTestHelpers.AssertImportSubjectPublicKeyInfo( import => AssertThrowIfNotSupported(() => Assert.Throws(() => import(wrongAsnType)))); CompositeMLDsaTestHelpers.AssertImportPkcs8PrivateKey( @@ -485,7 +485,7 @@ public static void Import_WrongAsnType() } [Fact] - public static void ImportSubjectKeyPublicInfo_AlgorithmErrorsInAsn() + public static void ImportSubjectPublicKeyInfo_AlgorithmErrorsInAsn() { #if !NETFRAMEWORK // Does not support exporting RSA SPKI if (!OperatingSystem.IsBrowser()) @@ -493,7 +493,7 @@ public static void ImportSubjectKeyPublicInfo_AlgorithmErrorsInAsn() // RSA key using RSA rsa = RSA.Create(); byte[] rsaSpkiBytes = rsa.ExportSubjectPublicKeyInfo(); - CompositeMLDsaTestHelpers.AssertImportSubjectKeyPublicInfo( + CompositeMLDsaTestHelpers.AssertImportSubjectPublicKeyInfo( import => AssertThrowIfNotSupported(() => Assert.Throws(() => import(rsaSpkiBytes)))); } #endif @@ -509,17 +509,17 @@ public static void ImportSubjectKeyPublicInfo_AlgorithmErrorsInAsn() SubjectPublicKey = CompositeMLDsaTestData.GetIetfTestVector(CompositeMLDsaAlgorithm.MLDsa65WithECDsaP384).PublicKey, }; - CompositeMLDsaTestHelpers.AssertImportSubjectKeyPublicInfo( + CompositeMLDsaTestHelpers.AssertImportSubjectPublicKeyInfo( import => AssertThrowIfNotSupported(() => Assert.Throws(() => import(spki.Encode())))); spki.Algorithm.Parameters = AsnUtils.DerNull; - CompositeMLDsaTestHelpers.AssertImportSubjectKeyPublicInfo( + CompositeMLDsaTestHelpers.AssertImportSubjectPublicKeyInfo( import => AssertThrowIfNotSupported(() => Assert.Throws(() => import(spki.Encode())))); // Sanity check spki.Algorithm.Parameters = null; - CompositeMLDsaTestHelpers.AssertImportSubjectKeyPublicInfo(import => AssertThrowIfNotSupported(() => import(spki.Encode()))); + CompositeMLDsaTestHelpers.AssertImportSubjectPublicKeyInfo(import => AssertThrowIfNotSupported(() => import(spki.Encode()))); } [Fact] diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaImplementationTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaImplementationTests.cs index 49ff300e57eb34..2d7c9c7bba839e 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaImplementationTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaImplementationTests.cs @@ -143,10 +143,9 @@ public void RoundTrip_Export_Import_SPKI(CompositeMLDsaAlgorithm algorithm) // Generate new key using CompositeMLDsa dsa = GenerateKey(algorithm); byte[] publicKey = dsa.ExportCompositeMLDsaPublicKey(); - byte[] privateKey = dsa.ExportCompositeMLDsaPrivateKey(); - CompositeMLDsaTestHelpers.AssertExportPkcs8PrivateKey(export => - CompositeMLDsaTestHelpers.AssertImportPkcs8PrivateKey(import => + CompositeMLDsaTestHelpers.AssertExportSubjectPublicKeyInfo(export => + CompositeMLDsaTestHelpers.AssertImportSubjectPublicKeyInfo(import => { // Roundtrip it using SPKI using CompositeMLDsa roundTrippedDsa = import(export(dsa)); @@ -154,7 +153,7 @@ public void RoundTrip_Export_Import_SPKI(CompositeMLDsaAlgorithm algorithm) // The keys should be the same Assert.Equal(algorithm, roundTrippedDsa.Algorithm); AssertExtensions.SequenceEqual(publicKey, roundTrippedDsa.ExportCompositeMLDsaPublicKey()); - AssertExtensions.SequenceEqual(privateKey, roundTrippedDsa.ExportCompositeMLDsaPrivateKey()); + Assert.Throws(() => roundTrippedDsa.ExportCompositeMLDsaPrivateKey()); })); } @@ -282,7 +281,7 @@ public void RoundTrip_Import_Export_PrivateKey(CompositeMLDsaTestData.CompositeM [MemberData(nameof(CompositeMLDsaTestData.SupportedAlgorithmIetfVectorsTestData), MemberType = typeof(CompositeMLDsaTestData))] public void RoundTrip_Import_Export_SpkiPublicKey(CompositeMLDsaTestData.CompositeMLDsaTestVector info) { - CompositeMLDsaTestHelpers.AssertImportSubjectKeyPublicInfo(import => + CompositeMLDsaTestHelpers.AssertImportSubjectPublicKeyInfo(import => CompositeMLDsaTestHelpers.AssertExportSubjectPublicKeyInfo(export => CompositeMLDsaTestHelpers.WithDispose(import(info.Spki), dsa => AssertExtensions.SequenceEqual(info.Spki, export(dsa))))); diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaTestHelpers.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaTestHelpers.cs index 265010748170ee..b032ce46183f97 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaTestHelpers.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaTestHelpers.cs @@ -68,16 +68,16 @@ internal static void AssertImportPublicKey(Action> testDire SubjectPublicKey = publicKey, }; - AssertImportSubjectKeyPublicInfo(import => testEmbeddedCall(() => import(spki.Encode()))); + AssertImportSubjectPublicKeyInfo(import => testEmbeddedCall(() => import(spki.Encode()))); } - internal delegate CompositeMLDsa ImportSubjectKeyPublicInfoCallback(byte[] spki); - internal static void AssertImportSubjectKeyPublicInfo(Action test) => - AssertImportSubjectKeyPublicInfo(test, test); + internal delegate CompositeMLDsa ImportSubjectPublicKeyInfoCallback(byte[] spki); + internal static void AssertImportSubjectPublicKeyInfo(Action test) => + AssertImportSubjectPublicKeyInfo(test, test); - internal static void AssertImportSubjectKeyPublicInfo( - Action testDirectCall, - Action testEmbeddedCall) + internal static void AssertImportSubjectPublicKeyInfo( + Action testDirectCall, + Action testEmbeddedCall) { testDirectCall(spki => CompositeMLDsa.ImportSubjectPublicKeyInfo(spki)); testDirectCall(spki => CompositeMLDsa.ImportSubjectPublicKeyInfo(spki.AsSpan())); diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/MLDsa/MLDsaImplementationTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/MLDsa/MLDsaImplementationTests.cs index 2a10aa95a075c6..996558d86fc0f0 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/MLDsa/MLDsaImplementationTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/MLDsa/MLDsaImplementationTests.cs @@ -92,7 +92,7 @@ public static void ImportMLDsaPublicKey_WrongSize(MLDsaAlgorithm algorithm) } [Fact] - public static void ImportSubjectKeyPublicInfo_NullSource() + public static void ImportSubjectPublicKeyInfo_NullSource() { AssertExtensions.Throws("source", () => MLDsa.ImportSubjectPublicKeyInfo(null)); } @@ -153,7 +153,7 @@ public static void ArgumentValidation_MalformedAsnEncoding() static void AssertThrows(byte[] encodedBytes) { - MLDsaTestHelpers.AssertImportSubjectKeyPublicInfo( + MLDsaTestHelpers.AssertImportSubjectPublicKeyInfo( import => Assert.Throws(() => import(encodedBytes)), import => AssertThrowIfNotSupported(() => Assert.Throws(() => import(encodedBytes)))); @@ -172,7 +172,7 @@ public static void ImportSpki_BerEncoding() { // Valid BER but invalid DER - uses indefinite length encoding byte[] indefiniteLengthOctet = [0x04, 0x80, 0x01, 0x02, 0x03, 0x04, 0x00, 0x00]; - MLDsaTestHelpers.AssertImportSubjectKeyPublicInfo(import => + MLDsaTestHelpers.AssertImportSubjectPublicKeyInfo(import => AssertThrowIfNotSupported(() => Assert.Throws(() => import(indefiniteLengthOctet)))); } @@ -206,7 +206,7 @@ public static void ImportPkcs8_WrongTypeInAsn() algorithmIdentifier.Encode(writer); byte[] wrongAsnType = writer.Encode(); - MLDsaTestHelpers.AssertImportSubjectKeyPublicInfo( + MLDsaTestHelpers.AssertImportSubjectPublicKeyInfo( import => AssertThrowIfNotSupported(() => Assert.Throws(() => import(wrongAsnType)))); MLDsaTestHelpers.AssertImportPkcs8PrivateKey( @@ -217,7 +217,7 @@ public static void ImportPkcs8_WrongTypeInAsn() } [Fact] - public static void ImportSubjectKeyPublicInfo_AlgorithmErrorsInAsn() + public static void ImportSubjectPublicKeyInfo_AlgorithmErrorsInAsn() { #if !NETFRAMEWORK // Does not support exporting RSA SPKI if (!OperatingSystem.IsBrowser()) @@ -225,7 +225,7 @@ public static void ImportSubjectKeyPublicInfo_AlgorithmErrorsInAsn() // RSA key using RSA rsa = RSA.Create(); byte[] rsaSpkiBytes = rsa.ExportSubjectPublicKeyInfo(); - MLDsaTestHelpers.AssertImportSubjectKeyPublicInfo( + MLDsaTestHelpers.AssertImportSubjectPublicKeyInfo( import => AssertThrowIfNotSupported(() => Assert.Throws(() => import(rsaSpkiBytes)))); } #endif @@ -241,17 +241,17 @@ public static void ImportSubjectKeyPublicInfo_AlgorithmErrorsInAsn() SubjectPublicKey = new byte[MLDsaAlgorithm.MLDsa44.PublicKeySizeInBytes] }; - MLDsaTestHelpers.AssertImportSubjectKeyPublicInfo( + MLDsaTestHelpers.AssertImportSubjectPublicKeyInfo( import => AssertThrowIfNotSupported(() => Assert.Throws(() => import(spki.Encode())))); spki.Algorithm.Parameters = AsnUtils.DerNull; - MLDsaTestHelpers.AssertImportSubjectKeyPublicInfo( + MLDsaTestHelpers.AssertImportSubjectPublicKeyInfo( import => AssertThrowIfNotSupported(() => Assert.Throws(() => import(spki.Encode())))); // Sanity check spki.Algorithm.Parameters = null; - MLDsaTestHelpers.AssertImportSubjectKeyPublicInfo(import => AssertThrowIfNotSupported(() => import(spki.Encode()))); + MLDsaTestHelpers.AssertImportSubjectPublicKeyInfo(import => AssertThrowIfNotSupported(() => import(spki.Encode()))); } [Fact] @@ -486,7 +486,7 @@ public void RoundTrip_Import_Export_PrivateSeed(MLDsaKeyInfo info) [MemberData(nameof(MLDsaTestsData.IetfMLDsaAlgorithms), MemberType = typeof(MLDsaTestsData))] public void RoundTrip_Import_Export_SPKI(MLDsaKeyInfo info) { - MLDsaTestHelpers.AssertImportSubjectKeyPublicInfo(import => + MLDsaTestHelpers.AssertImportSubjectPublicKeyInfo(import => MLDsaTestHelpers.AssertExportSubjectPublicKeyInfo(export => WithDispose(import(info.Pkcs8PublicKey), mldsa => AssertExtensions.SequenceEqual(info.Pkcs8PublicKey, export(mldsa))))); diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/MLDsa/MLDsaTestHelpers.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/MLDsa/MLDsaTestHelpers.cs index d0a645563b02f4..581e7ae8140660 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/MLDsa/MLDsaTestHelpers.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/MLDsa/MLDsaTestHelpers.cs @@ -100,16 +100,16 @@ internal static void AssertImportPublicKey(Action> testDirectCall, A SubjectPublicKey = publicKey, }; - AssertImportSubjectKeyPublicInfo(import => testEmbeddedCall(() => import(spki.Encode()))); + AssertImportSubjectPublicKeyInfo(import => testEmbeddedCall(() => import(spki.Encode()))); } - internal delegate MLDsa ImportSubjectKeyPublicInfoCallback(byte[] spki); - internal static void AssertImportSubjectKeyPublicInfo(Action test) => - AssertImportSubjectKeyPublicInfo(test, test); + internal delegate MLDsa ImportSubjectPublicKeyInfoCallback(byte[] spki); + internal static void AssertImportSubjectPublicKeyInfo(Action test) => + AssertImportSubjectPublicKeyInfo(test, test); - internal static void AssertImportSubjectKeyPublicInfo( - Action testDirectCall, - Action testEmbeddedCall) + internal static void AssertImportSubjectPublicKeyInfo( + Action testDirectCall, + Action testEmbeddedCall) { testDirectCall(spki => MLDsa.ImportSubjectPublicKeyInfo(spki)); testDirectCall(spki => MLDsa.ImportSubjectPublicKeyInfo(spki.AsSpan())); diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaFactoryTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaFactoryTests.cs index 6544bc64fff92c..0a225c025925c5 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaFactoryTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaFactoryTests.cs @@ -73,7 +73,7 @@ public static void ArgumentValidation_MalformedAsnEncoding() static void AssertThrows(byte[] encodedBytes) { - SlhDsaTestHelpers.AssertImportSubjectKeyPublicInfo( + SlhDsaTestHelpers.AssertImportSubjectPublicKeyInfo( import => Assert.Throws(() => import(encodedBytes)), import => AssertThrowIfNotSupported(() => Assert.Throws(() => import(encodedBytes)))); @@ -92,7 +92,7 @@ public static void ImportSpki_BerEncoding() { // Valid BER but invalid DER - uses indefinite length encoding byte[] indefiniteLengthOctet = [0x04, 0x80, 0x01, 0x02, 0x03, 0x04, 0x00, 0x00]; - SlhDsaTestHelpers.AssertImportSubjectKeyPublicInfo(import => + SlhDsaTestHelpers.AssertImportSubjectPublicKeyInfo(import => AssertThrowIfNotSupported(() => Assert.Throws(() => import(indefiniteLengthOctet)))); } @@ -109,7 +109,7 @@ public static void ImportPkcs8_WrongTypeInAsn() algorithmIdentifier.Encode(writer); byte[] wrongAsnType = writer.Encode(); - SlhDsaTestHelpers.AssertImportSubjectKeyPublicInfo( + SlhDsaTestHelpers.AssertImportSubjectPublicKeyInfo( import => AssertThrowIfNotSupported(() => Assert.Throws(() => import(wrongAsnType)))); SlhDsaTestHelpers.AssertImportPkcs8PrivateKey( @@ -120,7 +120,7 @@ public static void ImportPkcs8_WrongTypeInAsn() } [Fact] - public static void ImportSubjectKeyPublicInfo_AlgorithmErrorsInAsn() + public static void ImportSubjectPublicKeyInfo_AlgorithmErrorsInAsn() { #if !NETFRAMEWORK // Does not support exporting RSA SPKI if (!OperatingSystem.IsBrowser()) @@ -128,7 +128,7 @@ public static void ImportSubjectKeyPublicInfo_AlgorithmErrorsInAsn() // RSA key using RSA rsa = RSA.Create(); byte[] rsaSpkiBytes = rsa.ExportSubjectPublicKeyInfo(); - SlhDsaTestHelpers.AssertImportSubjectKeyPublicInfo( + SlhDsaTestHelpers.AssertImportSubjectPublicKeyInfo( import => AssertThrowIfNotSupported(() => Assert.Throws(() => import(rsaSpkiBytes)))); } #endif @@ -144,17 +144,17 @@ public static void ImportSubjectKeyPublicInfo_AlgorithmErrorsInAsn() SubjectPublicKey = new byte[SlhDsaAlgorithm.SlhDsaSha2_128s.PublicKeySizeInBytes] }; - SlhDsaTestHelpers.AssertImportSubjectKeyPublicInfo( + SlhDsaTestHelpers.AssertImportSubjectPublicKeyInfo( import => AssertThrowIfNotSupported(() => Assert.Throws(() => import(spki.Encode())))); spki.Algorithm.Parameters = AsnUtils.DerNull; - SlhDsaTestHelpers.AssertImportSubjectKeyPublicInfo( + SlhDsaTestHelpers.AssertImportSubjectPublicKeyInfo( import => AssertThrowIfNotSupported(() => Assert.Throws(() => import(spki.Encode())))); // Sanity check spki.Algorithm.Parameters = null; - SlhDsaTestHelpers.AssertImportSubjectKeyPublicInfo(import => AssertThrowIfNotSupported(() => import(spki.Encode()))); + SlhDsaTestHelpers.AssertImportSubjectPublicKeyInfo(import => AssertThrowIfNotSupported(() => import(spki.Encode()))); } [Fact] diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaImplementationTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaImplementationTests.cs index 1994994012978e..8a20ca3b1be8de 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaImplementationTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaImplementationTests.cs @@ -129,10 +129,9 @@ public void RoundTrip_Export_Import_SPKI(SlhDsaAlgorithm algorithm) // Generate new key using SlhDsa slhDsa = GenerateKey(algorithm); byte[] publicKey = slhDsa.ExportSlhDsaPublicKey(); - byte[] privateKey = slhDsa.ExportSlhDsaPrivateKey(); - SlhDsaTestHelpers.AssertExportPkcs8PrivateKey(export => - SlhDsaTestHelpers.AssertImportPkcs8PrivateKey(import => + SlhDsaTestHelpers.AssertExportSubjectPublicKeyInfo(export => + SlhDsaTestHelpers.AssertImportSubjectPublicKeyInfo(import => { // Roundtrip it using SPKI using SlhDsa roundTrippedSlhDsa = import(export(slhDsa)); @@ -140,7 +139,7 @@ public void RoundTrip_Export_Import_SPKI(SlhDsaAlgorithm algorithm) // The keys should be the same Assert.Equal(algorithm, roundTrippedSlhDsa.Algorithm); AssertExtensions.SequenceEqual(publicKey, roundTrippedSlhDsa.ExportSlhDsaPublicKey()); - AssertExtensions.SequenceEqual(privateKey, roundTrippedSlhDsa.ExportSlhDsaPrivateKey()); + Assert.Throws(() => roundTrippedSlhDsa.ExportSlhDsaPrivateKey()); })); } @@ -268,7 +267,7 @@ public void RoundTrip_Import_Export_PrivateKey(SlhDsaTestData.SlhDsaGeneratedKey [MemberData(nameof(SlhDsaTestData.GeneratedKeyInfosData), MemberType = typeof(SlhDsaTestData))] public void RoundTrip_Import_Export_SPKI(SlhDsaTestData.SlhDsaGeneratedKeyInfo info) { - SlhDsaTestHelpers.AssertImportSubjectKeyPublicInfo(import => + SlhDsaTestHelpers.AssertImportSubjectPublicKeyInfo(import => SlhDsaTestHelpers.AssertExportSubjectPublicKeyInfo(export => SlhDsaTestHelpers.WithDispose(import(info.Pkcs8PublicKey), slhDsa => AssertExtensions.SequenceEqual(info.Pkcs8PublicKey, export(slhDsa))))); diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaTestHelpers.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaTestHelpers.cs index 0849eede434f92..08227cfcdd5675 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaTestHelpers.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaTestHelpers.cs @@ -76,16 +76,16 @@ internal static void AssertImportPublicKey(Action> testDirectCall, SubjectPublicKey = publicKey, }; - AssertImportSubjectKeyPublicInfo(import => testEmbeddedCall(() => import(spki.Encode()))); + AssertImportSubjectPublicKeyInfo(import => testEmbeddedCall(() => import(spki.Encode()))); } - internal delegate SlhDsa ImportSubjectKeyPublicInfoCallback(byte[] spki); - internal static void AssertImportSubjectKeyPublicInfo(Action test) => - AssertImportSubjectKeyPublicInfo(test, test); + internal delegate SlhDsa ImportSubjectPublicKeyInfoCallback(byte[] spki); + internal static void AssertImportSubjectPublicKeyInfo(Action test) => + AssertImportSubjectPublicKeyInfo(test, test); - internal static void AssertImportSubjectKeyPublicInfo( - Action testDirectCall, - Action testEmbeddedCall) + internal static void AssertImportSubjectPublicKeyInfo( + Action testDirectCall, + Action testEmbeddedCall) { testDirectCall(spki => SlhDsa.ImportSubjectPublicKeyInfo(spki)); testDirectCall(spki => SlhDsa.ImportSubjectPublicKeyInfo(spki.AsSpan()));