diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-07-21 00:26:34 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-07-21 00:26:34 +0700 |
commit | 9f36987f992075b2f61214f6d83433efd597e93e (patch) | |
tree | 4cc2e19d8dc1229479acbcdf2bb62811b0344785 /crypto/src/asn1/cmp/PKIFreeText.cs | |
parent | Refactoring in Asn1.Cms (diff) | |
download | BouncyCastle.NET-ed25519-9f36987f992075b2f61214f6d83433efd597e93e.tar.xz |
Refactoring in Asn1.Cmp
Diffstat (limited to 'crypto/src/asn1/cmp/PKIFreeText.cs')
-rw-r--r-- | crypto/src/asn1/cmp/PKIFreeText.cs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/crypto/src/asn1/cmp/PKIFreeText.cs b/crypto/src/asn1/cmp/PKIFreeText.cs index f4d7e0967..a567852e4 100644 --- a/crypto/src/asn1/cmp/PKIFreeText.cs +++ b/crypto/src/asn1/cmp/PKIFreeText.cs @@ -16,7 +16,7 @@ namespace Org.BouncyCastle.Asn1.Cmp public static PkiFreeText GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit) { - return GetInstance(Asn1Sequence.GetInstance(taggedObject, declaredExplicit)); + return new PkiFreeText(Asn1Sequence.GetInstance(taggedObject, declaredExplicit)); } private readonly Asn1Sequence m_strings; @@ -65,19 +65,13 @@ namespace Org.BouncyCastle.Asn1.Cmp * @param index index of the string of interest * @return the string at index. */ - public DerUtf8String this[int index] - { - get { return (DerUtf8String)m_strings[index]; } - } + public DerUtf8String this[int index] => (DerUtf8String)m_strings[index]; /** * <pre> * PkiFreeText ::= SEQUENCE SIZE (1..MAX) OF UTF8String * </pre> */ - public override Asn1Object ToAsn1Object() - { - return m_strings; - } + public override Asn1Object ToAsn1Object() => m_strings; } } |