71 lines
2.5 KiB
C#
71 lines
2.5 KiB
C#
using System;
|
|
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: 0x02001E40 RID: 7744
|
|
[Token(Token = "0x2001E40")]
|
|
public class Pkcs5Scheme2PbeKey : CmsPbeKey
|
|
{
|
|
// Token: 0x0600C242 RID: 49730 RVA: 0x002BEE90 File Offset: 0x002BD090
|
|
[Token(Token = "0x600C242")]
|
|
[Address(RVA = "0x2933BA0", Offset = "0x2932BA0", VA = "0x182933BA0")]
|
|
[Obsolete]
|
|
public Pkcs5Scheme2PbeKey(string password, byte[] salt, int iterationCount)
|
|
{
|
|
char[] array = password.ToCharArray();
|
|
base..ctor(array, salt, iterationCount);
|
|
}
|
|
|
|
// Token: 0x0600C243 RID: 49731 RVA: 0x002BEEB4 File Offset: 0x002BD0B4
|
|
[Token(Token = "0x600C243")]
|
|
[Address(RVA = "0x21482A0", Offset = "0x21472A0", VA = "0x1821482A0")]
|
|
[Obsolete]
|
|
public Pkcs5Scheme2PbeKey(string password, AlgorithmIdentifier keyDerivationAlgorithm)
|
|
{
|
|
char[] array = password.ToCharArray();
|
|
base..ctor(array, keyDerivationAlgorithm);
|
|
}
|
|
|
|
// Token: 0x0600C244 RID: 49732 RVA: 0x002BEED8 File Offset: 0x002BD0D8
|
|
[Token(Token = "0x600C244")]
|
|
[Address(RVA = "0x2933C00", Offset = "0x2932C00", VA = "0x182933C00")]
|
|
public Pkcs5Scheme2PbeKey(char[] password, byte[] salt, int iterationCount)
|
|
: base(password, salt, iterationCount)
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600C245 RID: 49733 RVA: 0x002BEEF0 File Offset: 0x002BD0F0
|
|
[Token(Token = "0x600C245")]
|
|
[Address(RVA = "0x2933C10", Offset = "0x2932C10", VA = "0x182933C10")]
|
|
public Pkcs5Scheme2PbeKey(char[] password, AlgorithmIdentifier keyDerivationAlgorithm)
|
|
: base(password, keyDerivationAlgorithm)
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600C246 RID: 49734 RVA: 0x002BEF08 File Offset: 0x002BD108
|
|
[Token(Token = "0x600C246")]
|
|
[Address(RVA = "0x2933A50", Offset = "0x2932A50", VA = "0x182933A50", 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();
|
|
}
|
|
}
|
|
}
|