m
This commit is contained in:
+214
@@ -0,0 +1,214 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests
|
||||
{
|
||||
// Token: 0x02001DDD RID: 7645
|
||||
[Token(Token = "0x2001DDD")]
|
||||
public class SkeinDigest : IDigest, IMemoable
|
||||
{
|
||||
// Token: 0x0600BF99 RID: 49049 RVA: 0x002B1C1C File Offset: 0x002AFE1C
|
||||
[Token(Token = "0x600BF99")]
|
||||
[Address(RVA = "0x2910680", Offset = "0x290F680", VA = "0x182910680")]
|
||||
public SkeinDigest(int stateSizeBits, int digestSizeBits)
|
||||
{
|
||||
SkeinEngine skeinEngine = new SkeinEngine(stateSizeBits, digestSizeBits);
|
||||
this.engine = skeinEngine;
|
||||
int num = 0;
|
||||
skeinEngine.chain = num;
|
||||
skeinEngine.key = num;
|
||||
skeinEngine.preMessageParameters = num;
|
||||
skeinEngine.postMessageParameters = num;
|
||||
skeinEngine.CreateInitialState();
|
||||
skeinEngine.UbiInit(48);
|
||||
}
|
||||
|
||||
// Token: 0x0600BF9A RID: 49050 RVA: 0x002B1C70 File Offset: 0x002AFE70
|
||||
[Token(Token = "0x600BF9A")]
|
||||
[Address(RVA = "0x29105C0", Offset = "0x290F5C0", VA = "0x1829105C0")]
|
||||
public SkeinDigest(SkeinDigest digest)
|
||||
{
|
||||
SkeinEngine skeinEngine = digest.engine;
|
||||
bool isPartialBlockOkay = skeinEngine.threefish.IsPartialBlockOkay;
|
||||
SkeinEngine skeinEngine2;
|
||||
skeinEngine2.CopyIn(skeinEngine);
|
||||
this.engine = skeinEngine2;
|
||||
}
|
||||
|
||||
// Token: 0x0600BF9B RID: 49051 RVA: 0x002B1CAC File Offset: 0x002AFEAC
|
||||
[Token(Token = "0x600BF9B")]
|
||||
[Address(RVA = "0x29103C0", Offset = "0x290F3C0", VA = "0x1829103C0", Slot = "12")]
|
||||
public void Reset(IMemoable other)
|
||||
{
|
||||
int num;
|
||||
SkeinEngine skeinEngine;
|
||||
for (;;)
|
||||
{
|
||||
num = 0;
|
||||
if (other != 0)
|
||||
{
|
||||
skeinEngine = this.engine;
|
||||
if (other == 0 || other != 0)
|
||||
{
|
||||
ThreefishEngine threefish = skeinEngine.threefish;
|
||||
bool isPartialBlockOkay = threefish.IsPartialBlockOkay;
|
||||
bool isPartialBlockOkay2 = threefish.IsPartialBlockOkay;
|
||||
if (isPartialBlockOkay == isPartialBlockOkay2 && skeinEngine.outputSizeBytes == (isPartialBlockOkay2 ? 1 : 0))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
skeinEngine.CopyIn(num);
|
||||
}
|
||||
|
||||
// Token: 0x0600BF9C RID: 49052 RVA: 0x002B1D0C File Offset: 0x002AFF0C
|
||||
[Token(Token = "0x600BF9C")]
|
||||
[Address(RVA = "0x2910170", Offset = "0x290F170", VA = "0x182910170", Slot = "11")]
|
||||
public IMemoable Copy()
|
||||
{
|
||||
SkeinEngine skeinEngine = this.engine;
|
||||
bool isPartialBlockOkay = skeinEngine.threefish.IsPartialBlockOkay;
|
||||
SkeinEngine skeinEngine2;
|
||||
skeinEngine2.CopyIn(skeinEngine);
|
||||
SkeinDigest skeinDigest;
|
||||
skeinDigest.engine = skeinEngine2;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x17001DC2 RID: 7618
|
||||
// (get) Token: 0x0600BF9D RID: 49053 RVA: 0x002B1D40 File Offset: 0x002AFF40
|
||||
[Token(Token = "0x17001DC2")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600BF9D")]
|
||||
[Address(RVA = "0x2910750", Offset = "0x290F750", VA = "0x182910750", Slot = "4")]
|
||||
get
|
||||
{
|
||||
object[] array = new object[4];
|
||||
if ("Skein-" != 0)
|
||||
{
|
||||
}
|
||||
array[0] = "Skein-";
|
||||
bool isPartialBlockOkay = this.engine.threefish.IsPartialBlockOkay;
|
||||
if (isPartialBlockOkay)
|
||||
{
|
||||
}
|
||||
array[1] = isPartialBlockOkay;
|
||||
if ("-" != 0)
|
||||
{
|
||||
}
|
||||
array[2] = "-";
|
||||
int outputSizeBytes = this.engine.outputSizeBytes;
|
||||
if (outputSizeBytes != 0)
|
||||
{
|
||||
}
|
||||
array[3] = outputSizeBytes;
|
||||
return string.Concat(array);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600BF9E RID: 49054 RVA: 0x002B1DC0 File Offset: 0x002AFFC0
|
||||
[Token(Token = "0x600BF9E")]
|
||||
[Address(RVA = "0x73E8F0", Offset = "0x73D8F0", VA = "0x18073E8F0", Slot = "5")]
|
||||
public int GetDigestSize()
|
||||
{
|
||||
return this.engine.outputSizeBytes;
|
||||
}
|
||||
|
||||
// Token: 0x0600BF9F RID: 49055 RVA: 0x002B1DE0 File Offset: 0x002AFFE0
|
||||
[Token(Token = "0x600BF9F")]
|
||||
[Address(RVA = "0x2910250", Offset = "0x290F250", VA = "0x182910250", Slot = "6")]
|
||||
public int GetByteLength()
|
||||
{
|
||||
string algorithmName = ((IBlockCipher)this.engine.threefish).AlgorithmName;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600BFA0 RID: 49056 RVA: 0x002B1E04 File Offset: 0x002B0004
|
||||
[Token(Token = "0x600BFA0")]
|
||||
[Address(RVA = "0x2910290", Offset = "0x290F290", VA = "0x182910290")]
|
||||
public void Init(SkeinParameters parameters)
|
||||
{
|
||||
SkeinEngine skeinEngine = this.engine;
|
||||
int num = 0;
|
||||
skeinEngine.chain = num;
|
||||
skeinEngine.key = num;
|
||||
skeinEngine.preMessageParameters = num;
|
||||
skeinEngine.postMessageParameters = num;
|
||||
if (parameters != 0)
|
||||
{
|
||||
byte[] key = parameters.GetKey();
|
||||
IDictionary parameters2 = parameters.parameters;
|
||||
skeinEngine.InitParams(parameters2);
|
||||
}
|
||||
skeinEngine.CreateInitialState();
|
||||
skeinEngine.UbiInit(48);
|
||||
}
|
||||
|
||||
// Token: 0x0600BFA1 RID: 49057 RVA: 0x002B1E64 File Offset: 0x002B0064
|
||||
[Token(Token = "0x600BFA1")]
|
||||
[Address(RVA = "0x2910360", Offset = "0x290F360", VA = "0x182910360", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
SkeinEngine skeinEngine = this.engine;
|
||||
ulong[] chain = skeinEngine.chain;
|
||||
int length = chain.Length;
|
||||
int num = 0;
|
||||
ulong[] initialState = skeinEngine.initialState;
|
||||
int num2 = 0;
|
||||
Array.Copy(initialState, num2, chain, num, length);
|
||||
skeinEngine.UbiInit(48);
|
||||
}
|
||||
|
||||
// Token: 0x0600BFA2 RID: 49058 RVA: 0x002B1EB0 File Offset: 0x002B00B0
|
||||
[Token(Token = "0x600BFA2")]
|
||||
[Address(RVA = "0x2910560", Offset = "0x290F560", VA = "0x182910560", Slot = "7")]
|
||||
public void Update(byte inByte)
|
||||
{
|
||||
SkeinEngine skeinEngine = this.engine;
|
||||
skeinEngine.singleByte[0] = inByte;
|
||||
byte[] singleByte = skeinEngine.singleByte;
|
||||
int num = 0;
|
||||
skeinEngine.Update(singleByte, num, 1);
|
||||
}
|
||||
|
||||
// Token: 0x0600BFA3 RID: 49059 RVA: 0x002B1EEC File Offset: 0x002B00EC
|
||||
[Token(Token = "0x600BFA3")]
|
||||
[Address(RVA = "0x25C7900", Offset = "0x25C6900", VA = "0x1825C7900", Slot = "8")]
|
||||
public void BlockUpdate(byte[] inBytes, int inOff, int len)
|
||||
{
|
||||
this.engine.Update(inBytes, inOff, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600BFA4 RID: 49060 RVA: 0x002B1F10 File Offset: 0x002B0110
|
||||
[Token(Token = "0x600BFA4")]
|
||||
[Address(RVA = "0x25C7930", Offset = "0x25C6930", VA = "0x1825C7930", Slot = "9")]
|
||||
public int DoFinal(byte[] outBytes, int outOff)
|
||||
{
|
||||
return this.engine.DoFinal(outBytes, outOff);
|
||||
}
|
||||
|
||||
// Token: 0x040078FD RID: 30973
|
||||
[Token(Token = "0x40078FD")]
|
||||
public const int SKEIN_256 = 256;
|
||||
|
||||
// Token: 0x040078FE RID: 30974
|
||||
[Token(Token = "0x40078FE")]
|
||||
public const int SKEIN_512 = 512;
|
||||
|
||||
// Token: 0x040078FF RID: 30975
|
||||
[Token(Token = "0x40078FF")]
|
||||
public const int SKEIN_1024 = 1024;
|
||||
|
||||
// Token: 0x04007900 RID: 30976
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007900")]
|
||||
private readonly SkeinEngine engine;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user