diff options
Diffstat (limited to '')
-rw-r--r-- | crypto/src/asn1/misc/CAST5CBCParameters.cs | 7 | ||||
-rw-r--r-- | crypto/src/asn1/misc/IDEACBCPar.cs | 8 |
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. |