diff options
Diffstat (limited to 'crypto/src/asn1/x509/AlgorithmIdentifier.cs')
-rw-r--r-- | crypto/src/asn1/x509/AlgorithmIdentifier.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crypto/src/asn1/x509/AlgorithmIdentifier.cs b/crypto/src/asn1/x509/AlgorithmIdentifier.cs index f73401b63..e46b22e4c 100644 --- a/crypto/src/asn1/x509/AlgorithmIdentifier.cs +++ b/crypto/src/asn1/x509/AlgorithmIdentifier.cs @@ -17,10 +17,8 @@ namespace Org.BouncyCastle.Asn1.X509 return new AlgorithmIdentifier(Asn1Sequence.GetInstance(obj)); } - public static AlgorithmIdentifier GetInstance(Asn1TaggedObject obj, bool explicitly) - { - return GetInstance(Asn1Sequence.GetInstance(obj, explicitly)); - } + public static AlgorithmIdentifier GetInstance(Asn1TaggedObject obj, bool explicitly) => + new AlgorithmIdentifier(Asn1Sequence.GetInstance(obj, explicitly)); public static AlgorithmIdentifier GetOptional(Asn1Encodable element) { @@ -37,6 +35,9 @@ namespace Org.BouncyCastle.Asn1.X509 return null; } + public static AlgorithmIdentifier GetTagged(Asn1TaggedObject taggedObject, bool declaredExplicit) => + new AlgorithmIdentifier(Asn1Sequence.GetTagged(taggedObject, declaredExplicit)); + public AlgorithmIdentifier( DerObjectIdentifier algorithm) { |