From a1a64b44cb847e2ecf0cd4894a087f04a2fc82f3 Mon Sep 17 00:00:00 2001 From: David Hook Date: Fri, 19 Mar 2021 19:43:33 +1100 Subject: updates for working tests for FPE, TupleHash, ParallelHash --- crypto/test/src/crypto/test/GcmSivTest.cs | 3 ++- crypto/test/src/crypto/test/ParallelHashTest.cs | 4 ++-- crypto/test/src/crypto/test/SP80038GTest.cs | 8 ++++---- crypto/test/src/crypto/test/TupleHashTest.cs | 3 ++- 4 files changed, 10 insertions(+), 8 deletions(-) (limited to 'crypto') diff --git a/crypto/test/src/crypto/test/GcmSivTest.cs b/crypto/test/src/crypto/test/GcmSivTest.cs index 03f1003f4..8446911bb 100644 --- a/crypto/test/src/crypto/test/GcmSivTest.cs +++ b/crypto/test/src/crypto/test/GcmSivTest.cs @@ -27,7 +27,8 @@ public class GcmSivTest get { return "GCM-SIV"; } } - public override void PerformTest() + [Test] + public override void PerformTest() { new AESGcmSiv128Test1().testTheCipher(this); new AESGcmSiv128Test2().testTheCipher(this); diff --git a/crypto/test/src/crypto/test/ParallelHashTest.cs b/crypto/test/src/crypto/test/ParallelHashTest.cs index 4edffc7c3..2c3bb5613 100644 --- a/crypto/test/src/crypto/test/ParallelHashTest.cs +++ b/crypto/test/src/crypto/test/ParallelHashTest.cs @@ -24,8 +24,8 @@ public class ParallelHashTest { get { return "ParallelHash"; } } - - public override void PerformTest() + [Test] + public override void PerformTest() { ParallelHash pHash = new ParallelHash(128, new byte[0], 8); diff --git a/crypto/test/src/crypto/test/SP80038GTest.cs b/crypto/test/src/crypto/test/SP80038GTest.cs index c6ed1b2c7..d9a16fd9a 100644 --- a/crypto/test/src/crypto/test/SP80038GTest.cs +++ b/crypto/test/src/crypto/test/SP80038GTest.cs @@ -292,7 +292,7 @@ namespace Org.BouncyCastle.Crypto.Tests } catch (InvalidOperationException e) { - IsEquals("Fpe disabled", e.Message); + IsEquals("FPE disabled", e.Message); } Environment.SetEnvironmentVariable("org.bouncycastle.fpe.disable", "false"); @@ -323,7 +323,7 @@ namespace Org.BouncyCastle.Crypto.Tests ulong valueToEncrypt = 0x31009155FFL; - byte[] bytes = Pack.UInt64_To_BE(valueToEncrypt); + byte[] bytes = Hex.Decode("00000031009155FF"); byte[] enc = new byte[bytes.Length]; //Encrypt @@ -508,8 +508,8 @@ namespace Org.BouncyCastle.Crypto.Tests { get { return "SP80038GTest"; } } - - public override void PerformTest() + [Test] + public override void PerformTest() { testFF1(); testFF1w(); diff --git a/crypto/test/src/crypto/test/TupleHashTest.cs b/crypto/test/src/crypto/test/TupleHashTest.cs index f212f4abe..dc2062577 100644 --- a/crypto/test/src/crypto/test/TupleHashTest.cs +++ b/crypto/test/src/crypto/test/TupleHashTest.cs @@ -23,7 +23,8 @@ public class TupleHashTest get { return "TupleHash"; } } - public override void PerformTest() + [Test] + public override void PerformTest() { TupleHash tHash = new TupleHash(128, new byte[0]); -- cgit 1.4.1