FlushFinalBlock Method

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 Sub FlushFinalBlock

Exception Condition
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
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show:
© 2016 Microsoft