summary refs log tree commit diff
path: root/crypto/test
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-04-12 19:47:03 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-04-12 19:47:03 +0700
commit05a2153fc8cee0f896a8807c0f5decfdb9c06aee (patch)
tree539fca5b99d32c658f8496dfb5055e7d1edbce85 /crypto/test
parentX509: Refactor stream calculator usage (diff)
downloadBouncyCastle.NET-ed25519-05a2153fc8cee0f896a8807c0f5decfdb9c06aee.tar.xz
Use KeyParameter.KeyLength
Diffstat (limited to 'crypto/test')
-rw-r--r--crypto/test/src/test/BaseBlockCipherTest.cs4
-rw-r--r--crypto/test/src/test/HMacTest.cs2
2 files changed, 3 insertions, 3 deletions
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()