diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-07-27 18:49:31 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-07-27 18:49:31 +0700 |
commit | a41e9dbc22fda83c4e81e5f3c56d49b1fa124e3f (patch) | |
tree | c63951f0ed67be114833bec65256e5e03174dbe6 /crypto/src/crmf/RegTokenControl.cs | |
parent | Refactoring around stream calculators (diff) | |
download | BouncyCastle.NET-ed25519-a41e9dbc22fda83c4e81e5f3c56d49b1fa124e3f.tar.xz |
CMP, CRMF updates from bc-java
Diffstat (limited to '')
-rw-r--r-- | crypto/src/crmf/RegTokenControl.cs | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/crypto/src/crmf/RegTokenControl.cs b/crypto/src/crmf/RegTokenControl.cs index 43484097c..a890c289c 100644 --- a/crypto/src/crmf/RegTokenControl.cs +++ b/crypto/src/crmf/RegTokenControl.cs @@ -1,6 +1,4 @@ -using System; - -using Org.BouncyCastle.Asn1; +using Org.BouncyCastle.Asn1; using Org.BouncyCastle.Asn1.Crmf; namespace Org.BouncyCastle.Crmf @@ -8,9 +6,7 @@ namespace Org.BouncyCastle.Crmf public class RegTokenControl : IControl { - private static readonly DerObjectIdentifier type = CrmfObjectIdentifiers.id_regCtrl_regToken; - - private readonly DerUtf8String token; + private readonly DerUtf8String m_token; /// <summary> /// Basic constructor - build from a UTF-8 string representing the token. @@ -18,7 +14,7 @@ namespace Org.BouncyCastle.Crmf /// <param name="token">UTF-8 string representing the token.</param> public RegTokenControl(DerUtf8String token) { - this.token = token; + m_token = token; } /// <summary> @@ -27,25 +23,19 @@ namespace Org.BouncyCastle.Crmf /// <param name="token">string representing the token.</param> public RegTokenControl(string token) { - this.token = new DerUtf8String(token); + m_token = new DerUtf8String(token); } /// <summary> /// Return the type of this control. /// </summary> /// <returns>CRMFObjectIdentifiers.id_regCtrl_regToken</returns> - public DerObjectIdentifier Type - { - get { return type; } - } + public DerObjectIdentifier Type => CrmfObjectIdentifiers.id_regCtrl_regToken; /// <summary> /// Return the token associated with this control (a UTF8String). /// </summary> /// <returns>a UTF8String.</returns> - public Asn1Encodable Value - { - get { return token; } - } + public Asn1Encodable Value => m_token; } } |