From 6c9fd19b35c35e30a9b4204bd0ff3e0ae11f6462 Mon Sep 17 00:00:00 2001 From: gefeili Date: Mon, 23 Jan 2023 14:42:24 +1030 Subject: Remove merge errors --- crypto/test/src/crypto/test/AsconTest.cs | 37 +------------------------------- 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/crypto/test/src/crypto/test/AsconTest.cs b/crypto/test/src/crypto/test/AsconTest.cs index 255cc2770..c2dc22973 100644 --- a/crypto/test/src/crypto/test/AsconTest.cs +++ b/crypto/test/src/crypto/test/AsconTest.cs @@ -372,8 +372,6 @@ namespace BouncyCastle.Crypto.Tests { Assert.Fail("Splitting input of plaintext should output the same ciphertext"); } - -<<<<<<< HEAD //#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER // Span c4_1 = new byte[c2.Length]; // Span c4_2 = new byte[c2.Length]; @@ -406,40 +404,7 @@ namespace BouncyCastle.Crypto.Tests // Assert.Fail("mac should match for the same AAD and message with different offset for both input and output"); // } //#endif -======= -#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER - Span c4_1 = new byte[c2.Length]; - Span c4_2 = new byte[c2.Length]; - ReadOnlySpan m5 = new ReadOnlySpan(m2); - ReadOnlySpan aad4 = new ReadOnlySpan(aad2); - aeadBlockCipher.Init(true, param); - aeadBlockCipher.ProcessAadBytes(aad4); - offset = aeadBlockCipher.ProcessBytes(m5, c4_1); - aeadBlockCipher.DoFinal(c4_2); - byte[] c5 = new byte[c2.Length]; - Array.Copy(c4_1.ToArray(), 0, c5, 0, offset); - Array.Copy(c4_2.ToArray(), 0, c5, offset, c5.Length - offset); - if (!Arrays.AreEqual(c2, c5)) - { - Assert.Fail("mac should match for the same AAD and message with different offset for both input and output"); - } - aeadBlockCipher.Reset(); - aeadBlockCipher.Init(false, param); - Span m6_1 = new byte[m2.Length]; - Span m6_2 = new byte[m2.Length]; - ReadOnlySpan c6 = new ReadOnlySpan(c2); - aeadBlockCipher.ProcessAadBytes(aad4); - offset = aeadBlockCipher.ProcessBytes(c6, m6_1); - aeadBlockCipher.DoFinal(m6_2); - byte[] m6 = new byte[m2.Length]; - Array.Copy(m6_1.ToArray(), 0, m6, 0, offset); - Array.Copy(m6_2.ToArray(), 0, m6, offset, m6.Length - offset); - if (!Arrays.AreEqual(m2, m6)) - { - Assert.Fail("mac should match for the same AAD and message with different offset for both input and output"); - } -#endif ->>>>>>> 50f605fdfafd4bcf2fff5f75b1ade5490e7710ab + } private void testParameters(AsconEngine ascon, int keySize, int ivSize, int macSize, int blockSize) -- cgit 1.4.1