summary refs log tree commit diff
path: root/crypto/src/asn1
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2024-06-20 21:31:51 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2024-06-20 21:31:51 +0700
commit73c22f5a643a20ae504c91b862b6be22917932e4 (patch)
treefd59185dadff8ca43bb694e15d896ff86414edc4 /crypto/src/asn1
parentImprove RC2 effective key bits determination (diff)
downloadBouncyCastle.NET-ed25519-73c22f5a643a20ae504c91b862b6be22917932e4.tar.xz
Refactoring in ParameterUtilities
Diffstat (limited to '')
-rw-r--r--crypto/src/asn1/misc/CAST5CBCParameters.cs7
-rw-r--r--crypto/src/asn1/misc/IDEACBCPar.cs8
2 files changed, 7 insertions, 8 deletions
diff --git a/crypto/src/asn1/misc/CAST5CBCParameters.cs b/crypto/src/asn1/misc/CAST5CBCParameters.cs
index 7bd9f1ec6..3adafe05f 100644
--- a/crypto/src/asn1/misc/CAST5CBCParameters.cs
+++ b/crypto/src/asn1/misc/CAST5CBCParameters.cs
@@ -45,10 +45,9 @@ namespace Org.BouncyCastle.Asn1.Misc
             keyLength = (DerInteger) seq[1];
         }
 
-		public byte[] GetIV()
-        {
-			return Arrays.Clone(iv.GetOctets());
-		}
+        public Asn1OctetString IV => iv;
+
+        public byte[] GetIV() => Arrays.Clone(iv.GetOctets());
 
 		public int KeyLength
 		{
diff --git a/crypto/src/asn1/misc/IDEACBCPar.cs b/crypto/src/asn1/misc/IDEACBCPar.cs
index 96bfb89b0..9b73f5729 100644
--- a/crypto/src/asn1/misc/IDEACBCPar.cs
+++ b/crypto/src/asn1/misc/IDEACBCPar.cs
@@ -1,6 +1,7 @@
 using System;
 
 using Org.BouncyCastle.Asn1;
+using Org.BouncyCastle.Utilities;
 
 namespace Org.BouncyCastle.Asn1.Misc
 {
@@ -40,10 +41,9 @@ namespace Org.BouncyCastle.Asn1.Misc
 			}
         }
 
-		public byte[] GetIV()
-        {
-			return iv == null ? null : iv.GetOctets();
-        }
+        public Asn1OctetString IV => iv;
+
+        public byte[] GetIV() => Arrays.Clone(iv.GetOctets());
 
 		/**
          * Produce an object suitable for an Asn1OutputStream.