55 lines
1.8 KiB
C#
55 lines
1.8 KiB
C#
using System;
|
|
using System.IO;
|
|
using System.Runtime.InteropServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Extension
|
|
{
|
|
// Token: 0x02001341 RID: 4929
|
|
[Token(Token = "0x2001341")]
|
|
[StructLayout(3)]
|
|
public class SubjectKeyIdentifierStructure : SubjectKeyIdentifier
|
|
{
|
|
// Token: 0x06007C27 RID: 31783 RVA: 0x0019D5E0 File Offset: 0x0019B7E0
|
|
[Token(Token = "0x6007C27")]
|
|
[Address(RVA = "0x52AD70", Offset = "0x529770", VA = "0x18052AD70")]
|
|
public SubjectKeyIdentifierStructure(Asn1OctetString encodedValue)
|
|
{
|
|
Asn1Object asn1Object;
|
|
do
|
|
{
|
|
Stream octetStream = encodedValue.GetOctetStream();
|
|
if (asn1Object == 0)
|
|
{
|
|
}
|
|
}
|
|
while (asn1Object == 0);
|
|
}
|
|
|
|
// Token: 0x06007C28 RID: 31784 RVA: 0x0019D604 File Offset: 0x0019B804
|
|
[Token(Token = "0x6007C28")]
|
|
[Address(RVA = "0x52AC20", Offset = "0x529620", VA = "0x18052AC20")]
|
|
private static Asn1OctetString FromPublicKey(AsymmetricKeyParameter pubKey)
|
|
{
|
|
Asn1Object asn1Object = new SubjectKeyIdentifier(SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo(pubKey)).ToAsn1Object();
|
|
if (asn1Object == 0 || asn1Object != 0)
|
|
{
|
|
throw new NullReferenceException();
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06007C29 RID: 31785 RVA: 0x0019D640 File Offset: 0x0019B840
|
|
[Token(Token = "0x6007C29")]
|
|
[Address(RVA = "0x52AE30", Offset = "0x529830", VA = "0x18052AE30")]
|
|
public SubjectKeyIdentifierStructure(AsymmetricKeyParameter pubKey)
|
|
{
|
|
Asn1OctetString asn1OctetString = SubjectKeyIdentifierStructure.FromPublicKey(pubKey);
|
|
base..ctor(asn1OctetString);
|
|
}
|
|
}
|
|
}
|