Files
2026-06-04 11:42:34 +02:00

98 lines
4.8 KiB
C#

using System;
using System.IO;
namespace System.Net.Security
{
/// <summary>Provides methods for passing credentials across a stream and requesting or performing authentication for client-server applications.</summary>
// Token: 0x020001D2 RID: 466
public abstract class AuthenticatedStream : Stream
{
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Security.AuthenticatedStream" /> class. </summary>
/// <param name="innerStream">A <see cref="T:System.IO.Stream" /> object used by the <see cref="T:System.Net.Security.AuthenticatedStream" /> for sending and receiving data.</param>
/// <param name="leaveInnerStreamOpen">A <see cref="T:System.Boolean" /> that indicates whether closing this <see cref="T:System.Net.Security.AuthenticatedStream" /> object also closes <paramref name="innerStream" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="innerStream" /> is null.-or-<paramref name="innerStream" /> is equal to <see cref="F:System.IO.Stream.Null" />.</exception>
// Token: 0x06000EEA RID: 3818 RVA: 0x00029818 File Offset: 0x00027A18
protected AuthenticatedStream(Stream innerStream, bool leaveInnerStreamOpen)
{
this.innerStream = innerStream;
this.leaveStreamOpen = leaveInnerStreamOpen;
}
/// <summary>Gets the stream used by this <see cref="T:System.Net.Security.AuthenticatedStream" /> for sending and receiving data.</summary>
/// <returns>A <see cref="T:System.IO.Stream" /> object.</returns>
// Token: 0x17000511 RID: 1297
// (get) Token: 0x06000EEB RID: 3819 RVA: 0x00029830 File Offset: 0x00027A30
protected Stream InnerStream
{
get
{
return this.innerStream;
}
}
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether authentication was successful.</summary>
/// <returns>true if successful authentication occurred; otherwise, false. </returns>
// Token: 0x17000512 RID: 1298
// (get) Token: 0x06000EEC RID: 3820
public abstract bool IsAuthenticated { get; }
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether data sent using this <see cref="T:System.Net.Security.AuthenticatedStream" /> is encrypted.</summary>
/// <returns>true if data is encrypted before being transmitted over the network and decrypted when it reaches the remote endpoint; otherwise, false.</returns>
// Token: 0x17000513 RID: 1299
// (get) Token: 0x06000EED RID: 3821
public abstract bool IsEncrypted { get; }
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether both server and client have been authenticated.</summary>
/// <returns>true if the client and server have been authenticated; otherwise, false.</returns>
// Token: 0x17000514 RID: 1300
// (get) Token: 0x06000EEE RID: 3822
public abstract bool IsMutuallyAuthenticated { get; }
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the local side of the connection was authenticated as the server.</summary>
/// <returns>true if the local endpoint was authenticated as the server side of a client-server authenticated connection; false if the local endpoint was authenticated as the client.</returns>
// Token: 0x17000515 RID: 1301
// (get) Token: 0x06000EEF RID: 3823
public abstract bool IsServer { get; }
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the data sent using this stream is signed.</summary>
/// <returns>true if the data is signed before being transmitted; otherwise, false.</returns>
// Token: 0x17000516 RID: 1302
// (get) Token: 0x06000EF0 RID: 3824
public abstract bool IsSigned { get; }
/// <summary>Gets whether the stream used by this <see cref="T:System.Net.Security.AuthenticatedStream" /> for sending and receiving data has been left open.</summary>
/// <returns>true if the inner stream has been left open; otherwise, false.</returns>
// Token: 0x17000517 RID: 1303
// (get) Token: 0x06000EF1 RID: 3825 RVA: 0x00029838 File Offset: 0x00027A38
public bool LeaveInnerStreamOpen
{
get
{
return this.leaveStreamOpen;
}
}
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.Net.Security.AuthenticatedStream" /> and optionally releases the managed resources. </summary>
/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
// Token: 0x06000EF2 RID: 3826 RVA: 0x00029840 File Offset: 0x00027A40
protected override void Dispose(bool disposing)
{
if (disposing && this.innerStream != null)
{
if (!this.leaveStreamOpen)
{
this.innerStream.Close();
}
this.innerStream = null;
}
}
// Token: 0x04000D9D RID: 3485
private Stream innerStream;
// Token: 0x04000D9E RID: 3486
private bool leaveStreamOpen;
}
}