m
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Pkcs
|
||||
{
|
||||
// Token: 0x02001A72 RID: 6770
|
||||
[Token(Token = "0x2001A72")]
|
||||
public class Pkcs12Utilities
|
||||
{
|
||||
// Token: 0x0600A036 RID: 41014 RVA: 0x0021284C File Offset: 0x00210A4C
|
||||
[Token(Token = "0x600A036")]
|
||||
[Address(RVA = "0x64A570", Offset = "0x649570", VA = "0x18064A570")]
|
||||
public static byte[] ConvertToDefiniteLength(byte[] berPkcs12File)
|
||||
{
|
||||
return new Pfx(Asn1Sequence.GetInstance(Asn1Object.FromByteArray(berPkcs12File))).GetEncoded("DER");
|
||||
}
|
||||
|
||||
// Token: 0x0600A037 RID: 41015 RVA: 0x0021287C File Offset: 0x00210A7C
|
||||
[Token(Token = "0x600A037")]
|
||||
[Address(RVA = "0x64A1C0", Offset = "0x6491C0", VA = "0x18064A1C0")]
|
||||
public static byte[] ConvertToDefiniteLength(byte[] berPkcs12File, char[] passwd)
|
||||
{
|
||||
Pfx pfx = new Pfx(Asn1Sequence.GetInstance(Asn1Object.FromByteArray(berPkcs12File)));
|
||||
ContentInfo contentInfo = pfx.contentInfo;
|
||||
Stream octetStream = Asn1OctetString.GetInstance(contentInfo.content).GetOctetStream();
|
||||
DerObjectIdentifier contentType = contentInfo.contentType;
|
||||
Asn1Object asn1Object;
|
||||
DerOctetString derOctetString = new DerOctetString(asn1Object.GetEncoded("DER"));
|
||||
ContentInfo contentInfo2 = new ContentInfo(contentType, derOctetString);
|
||||
MacData macData = pfx.macData;
|
||||
int intValue = macData.iterationCount.IntValue;
|
||||
Stream octetStream2 = Asn1OctetString.GetInstance(contentInfo2.content).GetOctetStream();
|
||||
Asn1Object asn1Object2 = macData.digInfo.algID.ToAsn1Object();
|
||||
byte[] salt = macData.GetSalt();
|
||||
Asn1Object asn1Object3 = macData.digInfo.algID.ToAsn1Object();
|
||||
AlgorithmIdentifier algorithmIdentifier;
|
||||
byte[] array;
|
||||
DigestInfo digestInfo = new DigestInfo(algorithmIdentifier, array);
|
||||
byte[] salt2 = macData.GetSalt();
|
||||
MacData macData2 = new MacData(digestInfo, salt2, intValue);
|
||||
return new Pfx(contentInfo2, macData2).GetEncoded("DER");
|
||||
}
|
||||
|
||||
// Token: 0x0600A038 RID: 41016 RVA: 0x0021296C File Offset: 0x00210B6C
|
||||
[Token(Token = "0x600A038")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
public Pkcs12Utilities()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user