130 lines
4.0 KiB
C#
130 lines
4.0 KiB
C#
using System;
|
|
using System.IO;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO
|
|
{
|
|
// Token: 0x02001A1F RID: 6687
|
|
[Token(Token = "0x2001A1F")]
|
|
public sealed class Streams
|
|
{
|
|
// Token: 0x06009D40 RID: 40256 RVA: 0x002064C4 File Offset: 0x002046C4
|
|
[Token(Token = "0x6009D40")]
|
|
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
|
private Streams()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06009D41 RID: 40257 RVA: 0x002064D8 File Offset: 0x002046D8
|
|
[Token(Token = "0x6009D41")]
|
|
[Address(RVA = "0x4F0D60", Offset = "0x4EFD60", VA = "0x1804F0D60")]
|
|
public static void Drain(Stream inStr)
|
|
{
|
|
byte[] array = new byte[512];
|
|
}
|
|
|
|
// Token: 0x06009D42 RID: 40258 RVA: 0x002064F8 File Offset: 0x002046F8
|
|
[Token(Token = "0x6009D42")]
|
|
[Address(RVA = "0x4F1140", Offset = "0x4F0140", VA = "0x1804F1140")]
|
|
public static byte[] ReadAll(Stream inStr)
|
|
{
|
|
MemoryStream memoryStream = new MemoryStream();
|
|
byte[] array = new byte[512];
|
|
int num = memoryStream.ReadByte();
|
|
((IDisposable)memoryStream).Dispose();
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06009D43 RID: 40259 RVA: 0x00206528 File Offset: 0x00204728
|
|
[Token(Token = "0x6009D43")]
|
|
[Address(RVA = "0x4F0FD0", Offset = "0x4EFFD0", VA = "0x1804F0FD0")]
|
|
public static byte[] ReadAllLimited(Stream inStr, int limit)
|
|
{
|
|
MemoryStream memoryStream = new MemoryStream();
|
|
byte[] array = new byte[512];
|
|
int num = memoryStream.ReadByte();
|
|
((IDisposable)memoryStream).Dispose();
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06009D44 RID: 40260 RVA: 0x0020655C File Offset: 0x0020475C
|
|
[Token(Token = "0x6009D44")]
|
|
[Address(RVA = "0x4F12D0", Offset = "0x4F02D0", VA = "0x1804F12D0")]
|
|
public static int ReadFully(Stream inStr, byte[] buf)
|
|
{
|
|
int num = buf.Length;
|
|
int num2 = 0;
|
|
if (num > 0)
|
|
{
|
|
num -= num2;
|
|
}
|
|
return num2;
|
|
}
|
|
|
|
// Token: 0x06009D45 RID: 40261 RVA: 0x00206584 File Offset: 0x00204784
|
|
[Token(Token = "0x6009D45")]
|
|
[Address(RVA = "0x4F1240", Offset = "0x4F0240", VA = "0x1804F1240")]
|
|
public static int ReadFully(Stream inStr, byte[] buf, int off, int len)
|
|
{
|
|
int num = 0;
|
|
if (len > 0)
|
|
{
|
|
}
|
|
return num;
|
|
}
|
|
|
|
// Token: 0x06009D46 RID: 40262 RVA: 0x002065A0 File Offset: 0x002047A0
|
|
[Token(Token = "0x6009D46")]
|
|
[Address(RVA = "0x4F0F10", Offset = "0x4EFF10", VA = "0x1804F0F10")]
|
|
public static void PipeAll(Stream inStr, Stream outStr)
|
|
{
|
|
byte[] array = new byte[512];
|
|
int num = outStr.ReadByte();
|
|
}
|
|
|
|
// Token: 0x06009D47 RID: 40263 RVA: 0x002065C8 File Offset: 0x002047C8
|
|
[Token(Token = "0x6009D47")]
|
|
[Address(RVA = "0x4F0DF0", Offset = "0x4EFDF0", VA = "0x1804F0DF0")]
|
|
public static long PipeAllLimited(Stream inStr, long limit, Stream outStr)
|
|
{
|
|
byte[] array = new byte[512];
|
|
int num = outStr.ReadByte();
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06009D48 RID: 40264 RVA: 0x002065F0 File Offset: 0x002047F0
|
|
[Token(Token = "0x6009D48")]
|
|
[Address(RVA = "0x4F1350", Offset = "0x4F0350", VA = "0x1804F1350")]
|
|
public static void WriteBufTo(MemoryStream buf, Stream output)
|
|
{
|
|
((IDisposable)buf).Dispose();
|
|
}
|
|
|
|
// Token: 0x06009D49 RID: 40265 RVA: 0x0020660C File Offset: 0x0020480C
|
|
[Token(Token = "0x6009D49")]
|
|
[Address(RVA = "0x4F1380", Offset = "0x4F0380", VA = "0x1804F1380")]
|
|
public static int WriteBufTo(MemoryStream buf, byte[] output, int offset)
|
|
{
|
|
bool canWrite = buf.CanWrite;
|
|
ulong num;
|
|
MemoryStream memoryStream = new MemoryStream(output, offset, canWrite ? 1 : 0, num != 0UL);
|
|
byte[] array = buf.ToArray();
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06009D4A RID: 40266 RVA: 0x00206638 File Offset: 0x00204838
|
|
[Token(Token = "0x6009D4A")]
|
|
[Address(RVA = "0x4F1450", Offset = "0x4F0450", VA = "0x1804F1450")]
|
|
public static void WriteZeroes(Stream outStr, long count)
|
|
{
|
|
byte[] array = new byte[512];
|
|
int num = outStr.ReadByte();
|
|
int num2 = outStr.ReadByte();
|
|
}
|
|
|
|
// Token: 0x04006A28 RID: 27176
|
|
[Token(Token = "0x4006A28")]
|
|
private const int BufferSize = 512;
|
|
}
|
|
}
|