From 05a2153fc8cee0f896a8807c0f5decfdb9c06aee Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Wed, 12 Apr 2023 19:47:03 +0700 Subject: Use KeyParameter.KeyLength --- crypto/test/src/test/BaseBlockCipherTest.cs | 4 ++-- crypto/test/src/test/HMacTest.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crypto/test') diff --git a/crypto/test/src/test/BaseBlockCipherTest.cs b/crypto/test/src/test/BaseBlockCipherTest.cs index aca912131..2997126f6 100644 --- a/crypto/test/src/test/BaseBlockCipherTest.cs +++ b/crypto/test/src/test/BaseBlockCipherTest.cs @@ -55,7 +55,7 @@ namespace Org.BouncyCastle.Tests Fail("failed OID test"); } - if (k.GetKey().Length != (16 + ((i / groupSize) * 8))) + if (k.KeyLength != (16 + ((i / groupSize) * 8))) { Fail("failed key length test"); } @@ -87,7 +87,7 @@ namespace Org.BouncyCastle.Tests Fail("failed wrap OID test"); } - if (k.GetKey().Length != (16 + (i * 8))) + if (k.KeyLength != (16 + (i * 8))) { Fail("failed key length test"); } diff --git a/crypto/test/src/test/HMacTest.cs b/crypto/test/src/test/HMacTest.cs index e6fc07599..eccee245e 100644 --- a/crypto/test/src/test/HMacTest.cs +++ b/crypto/test/src/test/HMacTest.cs @@ -108,7 +108,7 @@ namespace Org.BouncyCastle.Tests mac.BlockUpdate(message, 0, message.Length); outBytes = MacUtilities.DoFinal(mac); - IsTrue("default key wrong length", key.GetKey().Length == (defKeySize / 8)); + IsTrue("default key wrong length", key.KeyLength == (defKeySize / 8)); } private void DoTestExceptions() -- cgit 1.5.1