summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-05-18 15:30:32 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-05-18 15:30:32 +0700
commit86496a017f71554ff6521a3f37f23268680052f3 (patch)
tree5f8b9544bb2dd328c9df5591e1a3c39d6675f8a7
parentCleanup around DtlsVerifier (diff)
downloadBouncyCastle.NET-ed25519-86496a017f71554ff6521a3f37f23268680052f3.tar.xz
Refactor AsconTest
-rw-r--r--crypto/test/src/crypto/test/AsconTest.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/test/src/crypto/test/AsconTest.cs b/crypto/test/src/crypto/test/AsconTest.cs
index 8edaf9182..b649cfa86 100644
--- a/crypto/test/src/crypto/test/AsconTest.cs
+++ b/crypto/test/src/crypto/test/AsconTest.cs
@@ -405,7 +405,7 @@ namespace Org.BouncyCastle.Crypto.Tests
 
         private static void ImplTestExceptionsDigest(AsconDigest.AsconParameters asconParameters)
         {
-            var ascon = new AsconDigest(asconParameters);
+            var ascon = CreateDigest(asconParameters);
 
             try
             {
@@ -805,8 +805,8 @@ namespace Org.BouncyCastle.Crypto.Tests
                 "iv bytes of " + ascon.AlgorithmName + " is not correct");
 
             var parameters = new ParametersWithIV(new KeyParameter(new byte[keySize]), new byte[ivSize]);
-            ascon.Init(true, parameters);
 
+            ascon.Init(true, parameters);
             Assert.AreEqual(macSize, ascon.GetOutputSize(0),
                 "GetOutputSize of " + ascon.AlgorithmName + " is incorrect for encryption");
 
@@ -929,7 +929,7 @@ namespace Org.BouncyCastle.Crypto.Tests
 
         private static void ImplTestVectorsXof(AsconXof.AsconParameters asconParameters, string filename)
         {
-            AsconXof ascon = new AsconXof(asconParameters);
+            var ascon = CreateXof(asconParameters);
             var buf = new Dictionary<string, string>();
             using (var src = new StreamReader(
                 SimpleTest.GetTestDataAsStream("crypto.ascon." + filename + "_LWC_HASH_KAT_256.txt")))