19 private bool m_bDisposed;
30 public virtual byte[]
Hash 67 return Create(
"System.Security.Cryptography.HashAlgorithm");
118 byte[] array =
new byte[4096];
122 num = inputStream.
Read(array, 0, 4096);
130 byte[] result = (
byte[])
HashValue.Clone();
153 byte[] result = (
byte[])
HashValue.Clone();
181 if (count < 0 || count > buffer.Length)
185 if (buffer.Length - count < offset)
195 byte[] result = (
byte[])
HashValue.Clone();
215 public int TransformBlock(
byte[] inputBuffer,
int inputOffset,
int inputCount,
byte[] outputBuffer,
int outputOffset)
217 if (inputBuffer ==
null)
225 if (inputCount < 0 || inputCount > inputBuffer.Length)
229 if (inputBuffer.Length - inputCount < inputOffset)
238 HashCore(inputBuffer, inputOffset, inputCount);
239 if (outputBuffer !=
null && (inputBuffer != outputBuffer || inputOffset != outputOffset))
241 Buffer.
BlockCopy(inputBuffer, inputOffset, outputBuffer, outputOffset, inputCount);
261 if (inputBuffer ==
null)
269 if (inputCount < 0 || inputCount > inputBuffer.Length)
273 if (inputBuffer.Length - inputCount < inputOffset)
281 HashCore(inputBuffer, inputOffset, inputCount);
286 array =
new byte[inputCount];
287 Buffer.InternalBlockCopy(inputBuffer, inputOffset, array, 0, inputCount);
291 array = EmptyArray<byte>.Value;
313 protected virtual void Dispose(
bool disposing)
333 protected abstract void HashCore(
byte[] array,
int ibStart,
int cbSize);
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
abstract int Read([In] [Out] byte[] buffer, int offset, int count)
When overridden in a derived class, reads a sequence of bytes from the current stream and advances th...
int State
Represents the state of the hash computation.
abstract void HashCore(byte[] array, int ibStart, int cbSize)
When overridden in a derived class, routes data written to the object into the hash algorithm for com...
int HashSizeValue
Represents the size, in bits, of the computed hash code.
static void SuppressFinalize(object obj)
Requests that the common language runtime not call the finalizer for the specified object.
virtual bool CanReuseTransform
Gets a value indicating whether the current transform can be reused.
static void Clear(Array array, int index, int length)
Sets a range of elements in an array to the default value of each element type.
abstract void Initialize()
Initializes an implementation of the T:System.Security.Cryptography.HashAlgorithm class.
abstract byte [] HashFinal()
When overridden in a derived class, finalizes the hash computation after the last data is processed b...
Provides a mechanism for releasing unmanaged resources.To browse the .NET Framework source code for t...
static object CreateFromName(string name, params object[] args)
Creates a new instance of the specified cryptographic object with the specified arguments.
The exception that is thrown when the value of an argument is outside the allowable range of values a...
virtual int OutputBlockSize
When overridden in a derived class, gets the output block size.
virtual bool CanTransformMultipleBlocks
When overridden in a derived class, gets a value indicating whether multiple blocks can be transforme...
static HashAlgorithm Create(string hashName)
Creates an instance of the specified implementation of a hash algorithm.
The exception that is thrown when an operation is performed on a disposed object.
Provides information about, and means to manipulate, the current environment and platform....
static HashAlgorithm Create()
Creates an instance of the default implementation of a hash algorithm.
byte [] ComputeHash(byte[] buffer, int offset, int count)
Computes the hash value for the specified region of the specified byte array.
Accesses the cryptography configuration information.
static void BlockCopy(Array src, int srcOffset, Array dst, int dstOffset, int count)
Copies a specified number of bytes from a source array starting at a particular offset to a destinati...
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Represents the base class from which all implementations of cryptographic hash algorithms must derive...
internal byte [] HashValue
Represents the value of the computed hash code.
Controls the system garbage collector, a service that automatically reclaims unused memory.
The exception that is thrown when one of the arguments provided to a method is not valid.
int TransformBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset)
Computes the hash value for the specified region of the input byte array and copies the specified reg...
byte [] ComputeHash(byte[] buffer)
Computes the hash value for the specified byte array.
Manipulates arrays of primitive types.
virtual void Dispose(bool disposing)
Releases the unmanaged resources used by the T:System.Security.Cryptography.HashAlgorithm and optiona...
The exception that is thrown when an unexpected operation occurs during a cryptographic operation.
virtual byte [] Hash
Gets the value of the computed hash code.
virtual int InputBlockSize
When overridden in a derived class, gets the input block size.
byte [] TransformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount)
Computes the hash value for the specified region of the specified byte array.
virtual int HashSize
Gets the size, in bits, of the computed hash code.
void Clear()
Releases all resources used by the T:System.Security.Cryptography.HashAlgorithm class.
void Dispose()
Releases all resources used by the current instance of the T:System.Security.Cryptography....
byte [] ComputeHash(Stream inputStream)
Computes the hash value for the specified T:System.IO.Stream object.
Provides a generic view of a sequence of bytes. This is an abstract class.To browse the ....