diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-07-20 19:01:12 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-07-20 19:01:12 +0700 |
commit | e5d77a0741bcc55088054b2ad4a91ab0508ac092 (patch) | |
tree | 816fc0d1139945ee9bfd22ca40f1e570e816a02f /crypto/src/asn1/cms/GcmParameters.cs | |
parent | Refactoring in Asn1.Crmf (diff) | |
download | BouncyCastle.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.cs | 8 |
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; |