HashAlgorithm.ComputeHash Method (Stream)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Computes the hash value for the specified Stream object.

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

member ComputeHash : 
        inputStream:Stream -> byte[]

Parameters

inputStream
Type: System.IO.Stream

The input to compute the hash code for.

Return Value

Type: System.Byte[]

The computed hash code.

Exception Condition
ObjectDisposedException

The object has already been disposed.

The following example calculates the RIPEMD160 hash for all files in a directory.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: