summary refs log tree commit diff
path: root/crypto/src/asn1/cms/GcmParameters.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-07-20 19:01:12 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-07-20 19:01:12 +0700
commite5d77a0741bcc55088054b2ad4a91ab0508ac092 (patch)
tree816fc0d1139945ee9bfd22ca40f1e570e816a02f /crypto/src/asn1/cms/GcmParameters.cs
parentRefactoring in Asn1.Crmf (diff)
downloadBouncyCastle.NET-ed25519-e5d77a0741bcc55088054b2ad4a91ab0508ac092.tar.xz
Refactoring in Asn1.Cms
Diffstat (limited to 'crypto/src/asn1/cms/GcmParameters.cs')
-rw-r--r--crypto/src/asn1/cms/GcmParameters.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/src/asn1/cms/GcmParameters.cs b/crypto/src/asn1/cms/GcmParameters.cs
index bc86d27fa..06b4b88ca 100644
--- a/crypto/src/asn1/cms/GcmParameters.cs
+++ b/crypto/src/asn1/cms/GcmParameters.cs
@@ -9,9 +9,6 @@ namespace Org.BouncyCastle.Asn1.Cms
     {
         private const int DefaultIcvLen = 12;
 
-        private readonly byte[] m_nonce;
-        private readonly int m_icvLen;
-
         public static GcmParameters GetInstance(object obj)
         {
             if (obj == null)
@@ -23,9 +20,12 @@ namespace Org.BouncyCastle.Asn1.Cms
 
         public static GcmParameters GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
         {
-            return GetInstance(Asn1Sequence.GetInstance(taggedObject, declaredExplicit));
+            return new GcmParameters(Asn1Sequence.GetInstance(taggedObject, declaredExplicit));
         }
 
+        private readonly byte[] m_nonce;
+        private readonly int m_icvLen;
+
         private GcmParameters(Asn1Sequence seq)
         {
             int count = seq.Count;