HashStream Constructor (Stream, Byte, Int64) |
Initializes an HashStream with a hash algorithm and a base stream.
Namespace: Aliyun.OSS.Common.InternalAssembly: Aliyun.OSS (in Aliyun.OSS.dll) Version: 2.5.1.0 (2.5.1)
Syntaxprotected HashStream(
Stream baseStream,
byte[] expectedHash,
long expectedLength
)
Protected Sub New (
baseStream As Stream,
expectedHash As Byte(),
expectedLength As Long
)
protected:
HashStream(
Stream^ baseStream,
array<unsigned char>^ expectedHash,
long long expectedLength
)
new :
baseStream : Stream *
expectedHash : byte[] *
expectedLength : int64 -> HashStream
Parameters
- baseStream
- Type: System.IOStream
Stream to calculate hash for. - expectedHash
- Type: SystemByte
Expected hash. Will be compared against calculated hash on stream close.
Pass in null to disable check.
- expectedLength
- Type: SystemInt64
Expected length of the stream. If the reading stops before reaching this
position, CalculatedHash will be set to empty array.
See Also