73 lines
2.5 KiB
C#
73 lines
2.5 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Generators;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Cms
|
|
{
|
|
// Token: 0x02001783 RID: 6019
|
|
[Token(Token = "0x2001783")]
|
|
[StructLayout(3)]
|
|
public class Pkcs5Scheme2PbeKey : CmsPbeKey
|
|
{
|
|
// Token: 0x0600A29A RID: 41626 RVA: 0x0025E190 File Offset: 0x0025C390
|
|
[Token(Token = "0x600A29A")]
|
|
[Address(RVA = "0x6625A0", Offset = "0x660FA0", VA = "0x1806625A0")]
|
|
[Obsolete]
|
|
public Pkcs5Scheme2PbeKey(string password, byte[] salt, int iterationCount)
|
|
{
|
|
char[] array = password.ToCharArray();
|
|
base..ctor(array, salt, iterationCount);
|
|
}
|
|
|
|
// Token: 0x0600A29B RID: 41627 RVA: 0x0025E1B4 File Offset: 0x0025C3B4
|
|
[Token(Token = "0x600A29B")]
|
|
[Address(RVA = "0x662620", Offset = "0x661020", VA = "0x180662620")]
|
|
[Obsolete]
|
|
public Pkcs5Scheme2PbeKey(string password, AlgorithmIdentifier keyDerivationAlgorithm)
|
|
{
|
|
char[] array = password.ToCharArray();
|
|
base..ctor(array, keyDerivationAlgorithm);
|
|
}
|
|
|
|
// Token: 0x0600A29C RID: 41628 RVA: 0x0025E1D8 File Offset: 0x0025C3D8
|
|
[Token(Token = "0x600A29C")]
|
|
[Address(RVA = "0x662600", Offset = "0x661000", VA = "0x180662600")]
|
|
public Pkcs5Scheme2PbeKey(char[] password, byte[] salt, int iterationCount)
|
|
: base(password, salt, iterationCount)
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600A29D RID: 41629 RVA: 0x0025E1F0 File Offset: 0x0025C3F0
|
|
[Token(Token = "0x600A29D")]
|
|
[Address(RVA = "0x662610", Offset = "0x661010", VA = "0x180662610")]
|
|
public Pkcs5Scheme2PbeKey(char[] password, AlgorithmIdentifier keyDerivationAlgorithm)
|
|
: base(password, keyDerivationAlgorithm)
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600A29E RID: 41630 RVA: 0x0025E208 File Offset: 0x0025C408
|
|
[Token(Token = "0x600A29E")]
|
|
[Address(RVA = "0x662450", Offset = "0x660E50", VA = "0x180662450", Slot = "4")]
|
|
internal override KeyParameter GetEncoded(string algorithmOid)
|
|
{
|
|
ICipherParameters cipherParameters;
|
|
do
|
|
{
|
|
Pkcs5S2ParametersGenerator pkcs5S2ParametersGenerator = new Pkcs5S2ParametersGenerator();
|
|
byte[] array = PbeParametersGenerator.Pkcs5PasswordToBytes(this.password);
|
|
string text = pkcs5S2ParametersGenerator.ToString();
|
|
int keySize = CmsEnvelopedHelper.Instance.GetKeySize(algorithmOid);
|
|
if (cipherParameters == 0)
|
|
{
|
|
}
|
|
}
|
|
while (cipherParameters == 0);
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
}
|