File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,20 @@ public class PopoPrivKey
13
13
public const int agreeMAC = 3 ;
14
14
public const int encryptedKey = 4 ;
15
15
16
+ public static PopoPrivKey GetInstance ( object obj )
17
+ {
18
+ if ( obj == null )
19
+ return null ;
20
+ if ( obj is PopoPrivKey popoPrivKey )
21
+ return popoPrivKey ;
22
+ return new PopoPrivKey ( Asn1TaggedObject . GetInstance ( obj , Asn1Tags . ContextSpecific ) ) ;
23
+ }
24
+
25
+ public static PopoPrivKey GetInstance ( Asn1TaggedObject tagged , bool isExplicit )
26
+ {
27
+ return Asn1Utilities . GetInstanceFromChoice ( tagged , isExplicit , GetInstance ) ;
28
+ }
29
+
16
30
private readonly int tagNo ;
17
31
private readonly Asn1Encodable obj ;
18
32
@@ -42,11 +56,6 @@ private PopoPrivKey(Asn1TaggedObject obj)
42
56
}
43
57
}
44
58
45
- public static PopoPrivKey GetInstance ( Asn1TaggedObject tagged , bool isExplicit )
46
- {
47
- return new PopoPrivKey ( Asn1TaggedObject . GetInstance ( tagged , true ) ) ;
48
- }
49
-
50
59
public PopoPrivKey ( PKMacValue pkMacValue )
51
60
{
52
61
this . tagNo = agreeMAC ;
You can’t perform that action at this time.
0 commit comments