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: 0x02001E41 RID: 7745
|
|
[Token(Token = "0x2001E41")]
|
|
public class Pkcs5Scheme2Utf8PbeKey : CmsPbeKey
|
|
{
|
|
// Token: 0x0600C247 RID: 49735 RVA: 0x002BEF4C File Offset: 0x002BD14C
|
|
[Token(Token = "0x600C247")]
|
|
[Address(RVA = "0x2933BA0", Offset = "0x2932BA0", VA = "0x182933BA0")]
|
|
[Obsolete]
|
|
public Pkcs5Scheme2Utf8PbeKey(string password, byte[] salt, int iterationCount)
|
|
{
|
|
char[] array = password.ToCharArray();
|
|
base..ctor(array, salt, iterationCount);
|
|
}
|
|
|
|
// Token: 0x0600C248 RID: 49736 RVA: 0x002BEF70 File Offset: 0x002BD170
|
|
[Token(Token = "0x600C248")]
|
|
[Address(RVA = "0x21482A0", Offset = "0x21472A0", VA = "0x1821482A0")]
|
|
[Obsolete]
|
|
public Pkcs5Scheme2Utf8PbeKey(string password, AlgorithmIdentifier keyDerivationAlgorithm)
|
|
{
|
|
char[] array = password.ToCharArray();
|
|
base..ctor(array, keyDerivationAlgorithm);
|
|
}
|
|
|
|
// Token: 0x0600C249 RID: 49737 RVA: 0x002BEF94 File Offset: 0x002BD194
|
|
[Token(Token = "0x600C249")]
|
|
[Address(RVA = "0x2933C00", Offset = "0x2932C00", VA = "0x182933C00")]
|
|
public Pkcs5Scheme2Utf8PbeKey(char[] password, byte[] salt, int iterationCount)
|
|
: base(password, salt, iterationCount)
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600C24A RID: 49738 RVA: 0x002BEFAC File Offset: 0x002BD1AC
|
|
[Token(Token = "0x600C24A")]
|
|
[Address(RVA = "0x2933C10", Offset = "0x2932C10", VA = "0x182933C10")]
|
|
public Pkcs5Scheme2Utf8PbeKey(char[] password, AlgorithmIdentifier keyDerivationAlgorithm)
|
|
: base(password, keyDerivationAlgorithm)
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600C24B RID: 49739 RVA: 0x002BEFC4 File Offset: 0x002BD1C4
|
|
[Token(Token = "0x600C24B")]
|
|
[Address(RVA = "0x2933C20", Offset = "0x2932C20", VA = "0x182933C20", Slot = "4")]
|
|
internal override KeyParameter GetEncoded(string algorithmOid)
|
|
{
|
|
ICipherParameters cipherParameters;
|
|
do
|
|
{
|
|
Pkcs5S2ParametersGenerator pkcs5S2ParametersGenerator = new Pkcs5S2ParametersGenerator();
|
|
byte[] array = PbeParametersGenerator.Pkcs5PasswordToUtf8Bytes(this.password);
|
|
string text = pkcs5S2ParametersGenerator.ToString();
|
|
int keySize = CmsEnvelopedHelper.Instance.GetKeySize(algorithmOid);
|
|
if (cipherParameters == 0)
|
|
{
|
|
}
|
|
}
|
|
while (cipherParameters == 0);
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
}
|