diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-03-11 23:36:32 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-03-11 23:36:32 +0700 |
commit | 8ed01d5f6322defa0b3dbb1e149b05736f54f832 (patch) | |
tree | fde48f03f14134ecd9b9ece814309bda07e85371 /crypto/src/asn1/nist | |
parent | Obsolete unused segmentLimit (diff) | |
download | BouncyCastle.NET-ed25519-8ed01d5f6322defa0b3dbb1e149b05736f54f832.tar.xz |
Refactoring in Asn1 classes
Diffstat (limited to 'crypto/src/asn1/nist')
-rw-r--r-- | crypto/src/asn1/nist/KMACwithSHAKE128_params.cs | 4 | ||||
-rw-r--r-- | crypto/src/asn1/nist/KMACwithSHAKE256_params.cs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/crypto/src/asn1/nist/KMACwithSHAKE128_params.cs b/crypto/src/asn1/nist/KMACwithSHAKE128_params.cs index df2bf0173..ca94b5bfe 100644 --- a/crypto/src/asn1/nist/KMACwithSHAKE128_params.cs +++ b/crypto/src/asn1/nist/KMACwithSHAKE128_params.cs @@ -56,9 +56,9 @@ public class KMacWithShake128Params : Asn1Encodable } else if (seq.Count == 1) { - if (seq[0] is DerInteger) + if (seq[0] is DerInteger derInteger) { - this.outputLength = DerInteger.GetInstance(seq[0]).IntValueExact; + this.outputLength = derInteger.IntValueExact; this.customizationString = EMPTY_STRING; } else diff --git a/crypto/src/asn1/nist/KMACwithSHAKE256_params.cs b/crypto/src/asn1/nist/KMACwithSHAKE256_params.cs index dfdfb2c36..99f444e7f 100644 --- a/crypto/src/asn1/nist/KMACwithSHAKE256_params.cs +++ b/crypto/src/asn1/nist/KMACwithSHAKE256_params.cs @@ -55,9 +55,9 @@ public class KMacWithShake256Params : Asn1Encodable } else if (seq.Count == 1) { - if (seq[0] is DerInteger) + if (seq[0] is DerInteger derInteger) { - this.outputLength = DerInteger.GetInstance(seq[0]).IntValueExact; + this.outputLength = derInteger.IntValueExact; this.customizationString = EMPTY_STRING; } else |