Files
Jan2021-Cpp2Il-Dump/Assembly-CSharp/BestHTTP/SecureProtocol/Org/BouncyCastle/Cms/KeyTransRecipientInformation.cs
T
2026-04-08 23:40:05 +02:00

86 lines
3.4 KiB
C#

using System;
using System.IO;
using System.Runtime.InteropServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Cms
{
// Token: 0x0200177F RID: 6015
[Token(Token = "0x200177F")]
[StructLayout(3)]
public class KeyTransRecipientInformation : RecipientInformation
{
// Token: 0x0600A28B RID: 41611 RVA: 0x0025DD50 File Offset: 0x0025BF50
[Token(Token = "0x600A28B")]
[Address(RVA = "0x660E70", Offset = "0x65F870", VA = "0x180660E70")]
internal KeyTransRecipientInformation(KeyTransRecipientInfo info, CmsSecureReadable secureReadable)
{
AlgorithmIdentifier keyEncryptionAlgorithm = info.keyEncryptionAlgorithm;
base..ctor(keyEncryptionAlgorithm, secureReadable);
this.info = info;
RecipientID recipientID = new RecipientID();
this.rid = recipientID;
RecipientIdentifier rid = info.rid;
if (!rid.IsTagged)
{
BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.IssuerAndSerialNumber instance = BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.IssuerAndSerialNumber.GetInstance(rid.ID);
RecipientID rid2 = this.rid;
X509Name name = instance.name;
rid2.issuer = name;
RecipientID rid3 = this.rid;
BigInteger value = instance.serialNumber.Value;
rid3.serialNumber = value;
}
Asn1OctetString instance2 = Asn1OctetString.GetInstance(rid.ID);
RecipientID rid4 = this.rid;
Stream octetStream = instance2.GetOctetStream();
}
// Token: 0x0600A28C RID: 41612 RVA: 0x0025DE28 File Offset: 0x0025C028
[Token(Token = "0x600A28C")]
[Address(RVA = "0x660AE0", Offset = "0x65F4E0", VA = "0x180660AE0")]
private string GetExchangeEncryptionAlgorithmName(DerObjectIdentifier oid)
{
DerObjectIdentifier rsaEncryption = PkcsObjectIdentifiers.RsaEncryption;
return oid.identifier;
}
// Token: 0x0600A28D RID: 41613 RVA: 0x0025DE50 File Offset: 0x0025C050
[Token(Token = "0x600A28D")]
[Address(RVA = "0x660B80", Offset = "0x65F580", VA = "0x180660B80")]
internal KeyParameter UnwrapKey(ICipherParameters key)
{
Stream octetStream = this.info.encryptedKey.GetOctetStream();
Asn1Object asn1Object = this.keyEncAlg.ToAsn1Object();
DerObjectIdentifier rsaEncryption = PkcsObjectIdentifiers.RsaEncryption;
IWrapper wrapper = WrapperUtilities.GetWrapper("RSA//PKCS1Padding");
string contentAlgorithmName = base.GetContentAlgorithmName();
Stream.ReadWriteTask activeReadWriteTask = octetStream._activeReadWriteTask;
KeyParameter keyParameter;
return keyParameter;
}
// Token: 0x0600A28E RID: 41614 RVA: 0x0025DEA4 File Offset: 0x0025C0A4
[Token(Token = "0x600A28E")]
[Address(RVA = "0x660AB0", Offset = "0x65F4B0", VA = "0x180660AB0", Slot = "4")]
public override CmsTypedStream GetContentStream(ICipherParameters key)
{
KeyParameter keyParameter = this.UnwrapKey(key);
return base.GetContentFromSessionKey(keyParameter);
}
// Token: 0x04006AE5 RID: 27365
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x4006AE5")]
private KeyTransRecipientInfo info;
}
}