CryptoStream: WriteBlock

WriteBlock

Writes a sequence of bytes to the current CryptoStream and advances the current position within this stream by the number of bytes written.



 Public Sub WriteBlock(
	  ByRef Buffer ( ) As Byte,
	  ByVal Offset As Long,
	  ByVal Count As Long )

Parameters

Buffer
[ByRef] Byte. An array of bytes. This method copies Count bytes from Buffer to the current stream.
Offset
[ByVal] Long. The byte offset in Buffer at which to begin copying bytes to the current stream.
Count
[ByVal] Long. The number of bytes to be written to the current stream.

Exceptions

Exception Condition
NotSupportedException The CryptoStreamMode associated with current CryptoStream object does not match the underlying stream. For example, this exception is thrown when using WriteMode with an underlying stream that is read only.
ArgumentOutOfRangeException The Offset parameter is less than zero.
-or-
The Count parameter is less than zero.
ArgumentExceptionThe sum of the Count and Offset parameters is longer than the length of the Buffer.

See Also

Project CorLib Overview

Class CryptoStream Overview