a
This commit is contained in:
@@ -0,0 +1,375 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
|
||||
{
|
||||
// Token: 0x02001F19 RID: 7961
|
||||
[Token(Token = "0x2001F19")]
|
||||
public class AttributeTable
|
||||
{
|
||||
// Token: 0x0600C925 RID: 51493 RVA: 0x002E111C File Offset: 0x002DF31C
|
||||
[Token(Token = "0x600C925")]
|
||||
[Address(RVA = "0x2ACF930", Offset = "0x2ACE730", VA = "0x182ACF930")]
|
||||
[Obsolete]
|
||||
public AttributeTable(Hashtable attrs)
|
||||
{
|
||||
IDictionary dictionary = Platform.CreateHashtable(attrs);
|
||||
this.attributes = dictionary;
|
||||
}
|
||||
|
||||
// Token: 0x0600C926 RID: 51494 RVA: 0x002E1140 File Offset: 0x002DF340
|
||||
[Token(Token = "0x600C926")]
|
||||
[Address(RVA = "0x2ACF8C0", Offset = "0x2ACE6C0", VA = "0x182ACF8C0")]
|
||||
public AttributeTable(IDictionary attrs)
|
||||
{
|
||||
IDictionary dictionary = Platform.CreateHashtable(attrs);
|
||||
this.attributes = dictionary;
|
||||
}
|
||||
|
||||
// Token: 0x0600C927 RID: 51495 RVA: 0x002E1164 File Offset: 0x002DF364
|
||||
[Token(Token = "0x600C927")]
|
||||
[Address(RVA = "0x2ACF6A0", Offset = "0x2ACE4A0", VA = "0x182ACF6A0")]
|
||||
public AttributeTable(Asn1EncodableVector v)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
base..ctor();
|
||||
IDictionary dictionary = Platform.CreateHashtable(v.Count);
|
||||
this.attributes = dictionary;
|
||||
IEnumerator enumerator = v.GetEnumerator();
|
||||
Attribute instance;
|
||||
if (enumerator != 0)
|
||||
{
|
||||
if (num < enumerator)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
num++;
|
||||
num += 19;
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
goto IL_5F;
|
||||
}
|
||||
instance = Attribute.GetInstance(num);
|
||||
this.AddAttribute(instance);
|
||||
}
|
||||
if (instance != 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
return;
|
||||
IL_5F:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600C928 RID: 51496 RVA: 0x002E11D8 File Offset: 0x002DF3D8
|
||||
[Token(Token = "0x600C928")]
|
||||
[Address(RVA = "0x2ACF9A0", Offset = "0x2ACE7A0", VA = "0x182ACF9A0")]
|
||||
public AttributeTable(Asn1Set s)
|
||||
{
|
||||
IDictionary dictionary;
|
||||
this.attributes = dictionary;
|
||||
int num = 0;
|
||||
Asn1Encodable asn1Encodable;
|
||||
if (num != asn1Encodable)
|
||||
{
|
||||
IEnumerator enumerator = s.GetEnumerator();
|
||||
Attribute attribute;
|
||||
this.AddAttribute(attribute);
|
||||
num++;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600C929 RID: 51497 RVA: 0x002E1214 File Offset: 0x002DF414
|
||||
[Token(Token = "0x600C929")]
|
||||
[Address(RVA = "0x2ACF570", Offset = "0x2ACE370", VA = "0x182ACF570")]
|
||||
public AttributeTable(Attributes attrs)
|
||||
{
|
||||
Asn1Set instance = Asn1Set.GetInstance(attrs.ToAsn1Object());
|
||||
base..ctor();
|
||||
IDictionary dictionary;
|
||||
this.attributes = dictionary;
|
||||
int num = 0;
|
||||
Asn1Encodable asn1Encodable;
|
||||
if (num != asn1Encodable)
|
||||
{
|
||||
IEnumerator enumerator = instance.GetEnumerator();
|
||||
Attribute attribute;
|
||||
this.AddAttribute(attribute);
|
||||
num++;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600C92A RID: 51498 RVA: 0x002E125C File Offset: 0x002DF45C
|
||||
[Token(Token = "0x600C92A")]
|
||||
[Address(RVA = "0x2ACE7A0", Offset = "0x2ACD5A0", VA = "0x182ACE7A0")]
|
||||
private void AddAttribute(Attribute a)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
IDictionary dictionary = this.attributes;
|
||||
num = 0;
|
||||
}
|
||||
while (num == 0 && num == 0);
|
||||
IList list = Platform.CreateArrayList();
|
||||
IDictionary dictionary2 = this.attributes;
|
||||
}
|
||||
|
||||
// Token: 0x17001F99 RID: 8089
|
||||
[Token(Token = "0x17001F99")]
|
||||
public Attribute this[DerObjectIdentifier oid]
|
||||
{
|
||||
[Token(Token = "0x600C92B")]
|
||||
[Address(RVA = "0x2ACFCB0", Offset = "0x2ACEAB0", VA = "0x182ACFCB0")]
|
||||
get
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
IDictionary dictionary = this.attributes;
|
||||
if (oid == 0)
|
||||
{
|
||||
}
|
||||
if (oid != 0)
|
||||
{
|
||||
int num = 0;
|
||||
if (num < dictionary)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
if (num == 0 || num != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600C92C RID: 51500 RVA: 0x002E12EC File Offset: 0x002DF4EC
|
||||
[Token(Token = "0x600C92C")]
|
||||
[Address(RVA = "0x2ACEED0", Offset = "0x2ACDCD0", VA = "0x182ACEED0")]
|
||||
[Obsolete]
|
||||
public Attribute Get(DerObjectIdentifier oid)
|
||||
{
|
||||
return this[oid];
|
||||
}
|
||||
|
||||
// Token: 0x0600C92D RID: 51501 RVA: 0x002E1300 File Offset: 0x002DF500
|
||||
[Token(Token = "0x600C92D")]
|
||||
[Address(RVA = "0x2ACEA40", Offset = "0x2ACD840", VA = "0x182ACEA40")]
|
||||
public Asn1EncodableVector GetAll(DerObjectIdentifier oid)
|
||||
{
|
||||
Asn1EncodableVector asn1EncodableVector;
|
||||
Asn1Encodable[] array2;
|
||||
do
|
||||
{
|
||||
int num = 0;
|
||||
IDictionary dictionary = this.attributes;
|
||||
if (asn1EncodableVector != 0)
|
||||
{
|
||||
if (asn1EncodableVector == 0 || asn1EncodableVector == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
Asn1Encodable[] array;
|
||||
if (asn1EncodableVector != 0)
|
||||
{
|
||||
if (num < asn1EncodableVector)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
if (asn1EncodableVector == 0)
|
||||
{
|
||||
}
|
||||
if (asn1EncodableVector == 0)
|
||||
{
|
||||
goto IL_A7;
|
||||
}
|
||||
array = new Asn1Encodable[1];
|
||||
if (asn1EncodableVector != 0)
|
||||
{
|
||||
}
|
||||
array[0] = asn1EncodableVector;
|
||||
asn1EncodableVector.Add(array);
|
||||
}
|
||||
if (array != 0)
|
||||
{
|
||||
}
|
||||
if (num != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
if (asn1EncodableVector == 0)
|
||||
{
|
||||
return asn1EncodableVector;
|
||||
}
|
||||
array2 = new Asn1Encodable[1];
|
||||
}
|
||||
while (asn1EncodableVector == 0 || asn1EncodableVector == 0);
|
||||
array2[0] = asn1EncodableVector;
|
||||
asn1EncodableVector.Add(array2);
|
||||
return asn1EncodableVector;
|
||||
IL_A7:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x17001F9A RID: 8090
|
||||
// (get) Token: 0x0600C92E RID: 51502 RVA: 0x002E13BC File Offset: 0x002DF5BC
|
||||
[Token(Token = "0x17001F9A")]
|
||||
public int Count
|
||||
{
|
||||
[Token(Token = "0x600C92E")]
|
||||
[Address(RVA = "0x2ACFAA0", Offset = "0x2ACE8A0", VA = "0x182ACFAA0")]
|
||||
get
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
IDictionary dictionary = this.attributes;
|
||||
num += num;
|
||||
num++;
|
||||
if (num == 0)
|
||||
{
|
||||
num++;
|
||||
num++;
|
||||
num += 19;
|
||||
}
|
||||
num += num;
|
||||
if (num != 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
return num;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600C92F RID: 51503 RVA: 0x002E140C File Offset: 0x002DF60C
|
||||
[Token(Token = "0x600C92F")]
|
||||
[Address(RVA = "0x2ACF4B0", Offset = "0x2ACE2B0", VA = "0x182ACF4B0")]
|
||||
public IDictionary ToDictionary()
|
||||
{
|
||||
return Platform.CreateHashtable(this.attributes);
|
||||
}
|
||||
|
||||
// Token: 0x0600C930 RID: 51504 RVA: 0x002E1424 File Offset: 0x002DF624
|
||||
[Token(Token = "0x600C930")]
|
||||
[Address(RVA = "0x2ACF510", Offset = "0x2ACE310", VA = "0x182ACF510")]
|
||||
[Obsolete]
|
||||
public Hashtable ToHashtable()
|
||||
{
|
||||
return new Hashtable(this.attributes);
|
||||
}
|
||||
|
||||
// Token: 0x0600C931 RID: 51505 RVA: 0x002E143C File Offset: 0x002DF63C
|
||||
[Token(Token = "0x600C931")]
|
||||
[Address(RVA = "0x2ACF010", Offset = "0x2ACDE10", VA = "0x182ACF010")]
|
||||
public Asn1EncodableVector ToAsn1EncodableVector()
|
||||
{
|
||||
Asn1EncodableVector asn1EncodableVector;
|
||||
Attribute instance;
|
||||
for (;;)
|
||||
{
|
||||
IDictionary dictionary = this.attributes;
|
||||
if (asn1EncodableVector != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if ((uint)(-1) != 0U)
|
||||
{
|
||||
}
|
||||
if (instance == 0)
|
||||
{
|
||||
return asn1EncodableVector;
|
||||
}
|
||||
}
|
||||
if (asn1EncodableVector != 0)
|
||||
{
|
||||
Attribute instance2;
|
||||
if (asn1EncodableVector != 0)
|
||||
{
|
||||
Asn1Encodable[] array = new Asn1Encodable[1];
|
||||
instance2 = Attribute.GetInstance(asn1EncodableVector);
|
||||
throw new ArrayTypeMismatchException();
|
||||
}
|
||||
if ((uint)(-1) != 0U)
|
||||
{
|
||||
}
|
||||
if (instance2 != 0)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
if ((ulong)((uint)(-1)) != (ulong)(-1L))
|
||||
{
|
||||
}
|
||||
}
|
||||
Asn1Encodable[] array2 = new Asn1Encodable[1];
|
||||
instance = Attribute.GetInstance(asn1EncodableVector);
|
||||
throw new ArrayTypeMismatchException();
|
||||
}
|
||||
|
||||
// Token: 0x0600C932 RID: 51506 RVA: 0x002E1500 File Offset: 0x002DF700
|
||||
[Token(Token = "0x600C932")]
|
||||
[Address(RVA = "0x2ACF400", Offset = "0x2ACE200", VA = "0x182ACF400")]
|
||||
public Attributes ToAttributes()
|
||||
{
|
||||
BerSet berSet = new BerSet(this.ToAsn1EncodableVector());
|
||||
Attributes attributes;
|
||||
attributes.attributes = berSet;
|
||||
return attributes;
|
||||
}
|
||||
|
||||
// Token: 0x0600C933 RID: 51507 RVA: 0x002E1524 File Offset: 0x002DF724
|
||||
[Token(Token = "0x600C933")]
|
||||
[Address(RVA = "0x2ACE930", Offset = "0x2ACD730", VA = "0x182ACE930")]
|
||||
public AttributeTable Add(DerObjectIdentifier attrType, Asn1Encodable attrValue)
|
||||
{
|
||||
IDictionary dictionary = Platform.CreateHashtable(this.attributes);
|
||||
AttributeTable attributeTable;
|
||||
attributeTable.attributes = dictionary;
|
||||
DerSet derSet = new DerSet(attrValue);
|
||||
Attribute attribute;
|
||||
attribute.attrType = attrType;
|
||||
attribute.attrValues = derSet;
|
||||
attributeTable.AddAttribute(attribute);
|
||||
return attributeTable;
|
||||
}
|
||||
|
||||
// Token: 0x0600C934 RID: 51508 RVA: 0x002E1564 File Offset: 0x002DF764
|
||||
[Token(Token = "0x600C934")]
|
||||
[Address(RVA = "0x2ACEEE0", Offset = "0x2ACDCE0", VA = "0x182ACEEE0")]
|
||||
public AttributeTable Remove(DerObjectIdentifier attrType)
|
||||
{
|
||||
IDictionary dictionary = Platform.CreateHashtable(this.attributes);
|
||||
AttributeTable attributeTable;
|
||||
attributeTable.attributes = dictionary;
|
||||
int num = 0;
|
||||
num += num;
|
||||
num++;
|
||||
return attributeTable;
|
||||
}
|
||||
|
||||
// Token: 0x04008050 RID: 32848
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4008050")]
|
||||
private readonly IDictionary attributes;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user