diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2024-06-21 17:21:34 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2024-06-21 17:21:34 +0700 |
commit | a3f7b8ba1349d1e518661aa2723e64f595dfb3df (patch) | |
tree | 4136daa6b201fb432b0028168039279600ce8ea7 /crypto/src/asn1/DerInteger.cs | |
parent | Refactoring in Asn1.Misc (diff) | |
download | BouncyCastle.NET-ed25519-a3f7b8ba1349d1e518661aa2723e64f595dfb3df.tar.xz |
ASN.1: GetTagged method for all universal types
Diffstat (limited to 'crypto/src/asn1/DerInteger.cs')
-rw-r--r-- | crypto/src/asn1/DerInteger.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crypto/src/asn1/DerInteger.cs b/crypto/src/asn1/DerInteger.cs index 666723527..c46aa99df 100644 --- a/crypto/src/asn1/DerInteger.cs +++ b/crypto/src/asn1/DerInteger.cs @@ -104,7 +104,12 @@ namespace Org.BouncyCastle.Asn1 return null; } - public DerInteger(int value) + public static DerInteger GetTagged(Asn1TaggedObject taggedObject, bool declaredExplicit) + { + return (DerInteger)Meta.Instance.GetTagged(taggedObject, declaredExplicit); + } + + public DerInteger(int value) { this.bytes = BigInteger.ValueOf(value).ToByteArray(); this.start = 0; |