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: 0x02001D61 RID: 7521
|
|
[Token(Token = "0x2001D61")]
|
|
public class Pkcs5Scheme2Utf8PbeKey : CmsPbeKey
|
|
{
|
|
// Token: 0x0600BE79 RID: 48761 RVA: 0x002B6654 File Offset: 0x002B4854
|
|
[Token(Token = "0x600BE79")]
|
|
[Address(RVA = "0x20130A0", Offset = "0x2011EA0", VA = "0x1820130A0")]
|
|
[Obsolete]
|
|
public Pkcs5Scheme2Utf8PbeKey(string password, byte[] salt, int iterationCount)
|
|
{
|
|
char[] array = password.ToCharArray();
|
|
base..ctor(array, salt, iterationCount);
|
|
}
|
|
|
|
// Token: 0x0600BE7A RID: 48762 RVA: 0x002B6678 File Offset: 0x002B4878
|
|
[Token(Token = "0x600BE7A")]
|
|
[Address(RVA = "0x1666C30", Offset = "0x1665A30", VA = "0x181666C30")]
|
|
[Obsolete]
|
|
public Pkcs5Scheme2Utf8PbeKey(string password, AlgorithmIdentifier keyDerivationAlgorithm)
|
|
{
|
|
char[] array = password.ToCharArray();
|
|
base..ctor(array, keyDerivationAlgorithm);
|
|
}
|
|
|
|
// Token: 0x0600BE7B RID: 48763 RVA: 0x002B669C File Offset: 0x002B489C
|
|
[Token(Token = "0x600BE7B")]
|
|
[Address(RVA = "0x2013100", Offset = "0x2011F00", VA = "0x182013100")]
|
|
public Pkcs5Scheme2Utf8PbeKey(char[] password, byte[] salt, int iterationCount)
|
|
: base(password, salt, iterationCount)
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600BE7C RID: 48764 RVA: 0x002B66B4 File Offset: 0x002B48B4
|
|
[Token(Token = "0x600BE7C")]
|
|
[Address(RVA = "0x2013110", Offset = "0x2011F10", VA = "0x182013110")]
|
|
public Pkcs5Scheme2Utf8PbeKey(char[] password, AlgorithmIdentifier keyDerivationAlgorithm)
|
|
: base(password, keyDerivationAlgorithm)
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600BE7D RID: 48765 RVA: 0x002B66CC File Offset: 0x002B48CC
|
|
[Token(Token = "0x600BE7D")]
|
|
[Address(RVA = "0x2013120", Offset = "0x2011F20", VA = "0x182013120", 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();
|
|
}
|
|
}
|
|
}
|