Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CryptoStream() [2/2]

System.Security.Cryptography.CryptoStream.CryptoStream ( Stream stream,
ICryptoTransform transform,
CryptoStreamMode mode,
bool leaveOpen )
inline

Definition at line 81 of file CryptoStream.cs.

82 {
83 if (transform == null)
84 {
85 throw new ArgumentNullException("transform");
86 }
88 _transform = transform;
89 _leaveOpen = leaveOpen;
90 switch (mode)
91 {
92 case CryptoStreamMode.Read:
93 if (!_stream.CanRead)
94 {
96 }
97 _canRead = true;
98 break;
99 case CryptoStreamMode.Write:
100 if (!_stream.CanWrite)
101 {
103 }
104 _canWrite = true;
105 break;
106 default:
108 }
110 _inputBuffer = new byte[_inputBlockSize];
113 }
static string Argument_InvalidValue
Definition SR.cs:24
static string Argument_StreamNotWritable
Definition SR.cs:878
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Argument_StreamNotReadable
Definition SR.cs:876
Definition SR.cs:7
readonly ICryptoTransform _transform

References System.Security.Cryptography.CryptoStream._canRead, System.Security.Cryptography.CryptoStream._canWrite, System.Security.Cryptography.CryptoStream._inputBlockSize, System.Security.Cryptography.CryptoStream._inputBuffer, System.Security.Cryptography.CryptoStream._leaveOpen, System.Security.Cryptography.CryptoStream._outputBlockSize, System.Security.Cryptography.CryptoStream._outputBuffer, System.Security.Cryptography.CryptoStream._stream, System.Security.Cryptography.CryptoStream._transform, System.SR.Argument_InvalidValue, System.SR.Argument_StreamNotReadable, System.SR.Argument_StreamNotWritable, System.IO.Stream.CanRead, System.IO.Stream.CanWrite, System.SR.Format(), System.Security.Cryptography.ICryptoTransform.InputBlockSize, System.Security.Cryptography.ICryptoTransform.OutputBlockSize, and System.stream.