Export (0) Print
Expand All

CryptoStream::FlushFinalBlock Method

Updates the underlying data source or repository with the current state of the buffer, then clears the buffer.

Namespace:  System.Security.Cryptography
Assembly:  mscorlib (in mscorlib.dll)

public:
void FlushFinalBlock()

ExceptionCondition
CryptographicException

The key is corrupt which can cause invalid padding to the stream.

NotSupportedException

The current stream is not writable.

-or-

The final block has already been transformed.

Calling the Close method will call FlushFinalBlock. If you do not call Close, call FlushFinalBlock to complete flushing the buffer. Call FlushFinalBlock only when all stream activity is complete.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Show:
© 2015 Microsoft