System.IO.Hashing
Provides an implementation of the CRC-32 algorithm, as used in
ITU-T V.42 and IEEE 802.3.
This implementation emits the answer in the Little Endian byte order so that
the CRC residue relationship (CRC(message concat CRC(message))) is a fixed value) holds.
For CRC-32 this stable output is the byte sequence { 0x1C, 0xDF, 0x44, 0x21 },
the Little Endian representation of 0x2144DF1C.
There are multiple, incompatible, definitions of a 32-bit cyclic redundancy
check (CRC) algorithm. When interoperating with another system, ensure that you
are using the same definition. The definition used by this implementation is not
compatible with the cyclic redundancy check described in ITU-T I.363.5.
Initializes a new instance of the class.
Appends the contents of to the data already
processed for the current hash computation.
The data to process.
Resets the hash computation to the initial state.
Writes the computed hash value to
without modifying accumulated state.
The buffer that receives the computed hash value.
Writes the computed hash value to
then clears the accumulated state.
Computes the CRC-32 hash of the provided data.
The data to hash.
The CRC-32 hash of the provided data.
is .
Computes the CRC-32 hash of the provided data.
The data to hash.
The CRC-32 hash of the provided data.
Attempts to compute the CRC-32 hash of the provided data into the provided destination.
The data to hash.
The buffer that receives the computed hash value.
On success, receives the number of bytes written to .
if is long enough to receive
the computed hash value (4 bytes); otherwise, .
Computes the CRC-32 hash of the provided data into the provided destination.
The data to hash.
The buffer that receives the computed hash value.
The number of bytes written to .
Provides an implementation of the CRC-64 algorithm as described in ECMA-182, Annex B.
This implementation emits the answer in the Big Endian byte order so that
the CRC residue relationship (CRC(message concat CRC(message))) is a fixed value) holds.
For CRC-64 this stable output is the byte sequence
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }.
There are multiple, incompatible, definitions of a 64-bit cyclic redundancy
check (CRC) algorithm. When interoperating with another system, ensure that you
are using the same definition. The definition used by this implementation is not
compatible with the cyclic redundancy check described in ISO 3309.
Initializes a new instance of the class.
Appends the contents of to the data already
processed for the current hash computation.
The data to process.
Resets the hash computation to the initial state.
Writes the computed hash value to
without modifying accumulated state.
The buffer that receives the computed hash value.
Writes the computed hash value to
then clears the accumulated state.
Computes the CRC-64 hash of the provided data.
The data to hash.
The CRC-64 hash of the provided data.
is .
Computes the CRC-64 hash of the provided data.
The data to hash.
The CRC-64 hash of the provided data.
Attempts to compute the CRC-64 hash of the provided data into the provided destination.
The data to hash.
The buffer that receives the computed hash value.
On success, receives the number of bytes written to .
if is long enough to receive
the computed hash value (8 bytes); otherwise, .
Computes the CRC-64 hash of the provided data into the provided destination.
The data to hash.
The buffer that receives the computed hash value.
The number of bytes written to .
Provides an implementation of the XxHash32 algorithm.
Initializes a new instance of the class.
The XxHash32 algorithm supports an optional seed value.
Instances created with this constructor use the default seed, zero.
Initializes a new instance of the class with
a specified seed.
The hash seed value for computations from this instance.
Resets the hash computation to the initial state.
Appends the contents of to the data already
processed for the current hash computation.
The data to process.
Writes the computed hash value to
without modifying accumulated state.
Computes the XxHash32 hash of the provided data.
The data to hash.
The XxHash32 hash of the provided data.
is .
Computes the XxHash32 hash of the provided data using the provided seed.
The data to hash.
The seed value for this hash computation.
The XxHash32 hash of the provided data.
is .
Computes the XxHash32 hash of the provided data.
The data to hash.
The seed value for this hash computation. The default is zero.
The XxHash32 hash of the provided data.
Attempts to compute the XxHash32 hash of the provided data into the provided destination.
The data to hash.
The buffer that receives the computed hash value.
On success, receives the number of bytes written to .
The seed value for this hash computation. The default is zero.
if is long enough to receive
the computed hash value (4 bytes); otherwise, .
Computes the XxHash32 hash of the provided data into the provided destination.
The data to hash.
The buffer that receives the computed hash value.
The seed value for this hash computation. The default is zero.
The number of bytes written to .
Provides an implementation of the XxHash64 algorithm.
Initializes a new instance of the class.
The XxHash64 algorithm supports an optional seed value.
Instances created with this constructor use the default seed, zero.
Initializes a new instance of the class with
a specified seed.
The hash seed value for computations from this instance.
Resets the hash computation to the initial state.
Appends the contents of to the data already
processed for the current hash computation.
The data to process.
Writes the computed hash value to
without modifying accumulated state.
Computes the XxHash64 hash of the provided data.
The data to hash.
The XxHash64 hash of the provided data.
is .
Computes the XxHash64 hash of the provided data using the provided seed.
The data to hash.
The seed value for this hash computation.
The XxHash64 hash of the provided data.
is .
Computes the XxHash64 hash of the provided data.
The data to hash.
The seed value for this hash computation. The default is zero.
The XxHash64 hash of the provided data.
Attempts to compute the XxHash64 hash of the provided data into the provided destination.
The data to hash.
The buffer that receives the computed hash value.
On success, receives the number of bytes written to .
The seed value for this hash computation. The default is zero.
if is long enough to receive
the computed hash value (4 bytes); otherwise, .
Computes the XxHash64 hash of the provided data into the provided destination.
The data to hash.
The buffer that receives the computed hash value.
The seed value for this hash computation. The default is zero.
The number of bytes written to .
Represents a non-cryptographic hash algorithm.
Gets the number of bytes produced from this hash algorithm.
The number of bytes produced from this hash algorithm.
Called from constructors in derived classes to initialize the
class.
The number of bytes produced from this hash algorithm.
is less than 1.
When overridden in a derived class,
appends the contents of to the data already
processed for the current hash computation.
The data to process.
When overridden in a derived class,
resets the hash computation to the initial state.
When overridden in a derived class,
writes the computed hash value to
without modifying accumulated state.
The buffer that receives the computed hash value.
Implementations of this method must write exactly
bytes to .
Do not assume that the buffer was zero-initialized.
The class validates the
size of the buffer before calling this method, and slices the span
down to be exactly in length.
Appends the contents of to the data already
processed for the current hash computation.
The data to process.
is .
Appends the contents of to the data already
processed for the current hash computation.
The data to process.
is .
Asychronously reads the contents of
and appends them to the data already
processed for the current hash computation.
The data to process.
The token to monitor for cancellation requests.
The default value is .
A task that represents the asynchronous append operation.
is .
Gets the current computed hash value without modifying accumulated state.
The hash value for the data already provided.
Attempts to write the computed hash value to
without modifying accumulated state.
The buffer that receives the computed hash value.
On success, receives the number of bytes written to .
if is long enough to receive
the computed hash value; otherwise, .
Writes the computed hash value to
without modifying accumulated state.
The buffer that receives the computed hash value.
The number of bytes written to ,
which is always .
is shorter than .
Gets the current computed hash value and clears the accumulated state.
The hash value for the data already provided.
Attempts to write the computed hash value to .
If successful, clears the accumulated state.
The buffer that receives the computed hash value.
On success, receives the number of bytes written to .
and clears the accumulated state
if is long enough to receive
the computed hash value; otherwise, .
Writes the computed hash value to
then clears the accumulated state.
The buffer that receives the computed hash value.
The number of bytes written to ,
which is always .
is shorter than .
Writes the computed hash value to
then clears the accumulated state.
The buffer that receives the computed hash value.
Implementations of this method must write exactly
bytes to .
Do not assume that the buffer was zero-initialized.
The class validates the
size of the buffer before calling this method, and slices the span
down to be exactly in length.
The default implementation of this method calls
followed by .
Overrides of this method do not need to call either of those methods,
but must ensure that the caller cannot observe a difference in behavior.
This method is not supported and should not be called.
Call or
instead.
This method will always throw a .
In all cases.
Destination is too short.
The GetHashCode method is not supported on this object. Use GetCurrentHash or GetHashAndReset to retrieve the hash code computed by this object.
Attribute used to indicate a source generator should create a function for marshalling
arguments instead of relying on the runtime to generate an equivalent marshalling function at run-time.
This attribute is meaningless if the source generator associated with it is not enabled.
The current built-in source generator only supports C# and only supplies an implementation when
applied to static, partial, non-generic methods.
Initializes a new instance of the .
Name of the library containing the import.
Gets the name of the library containing the import.
Gets or sets the name of the entry point to be called.
Gets or sets how to marshal string arguments to the method.
If this field is set to a value other than ,
must not be specified.
Gets or sets the used to control how string arguments to the method are marshalled.
If this field is specified, must not be specified
or must be set to .
Gets or sets whether the callee sets an error (SetLastError on Windows or errno
on other platforms) before returning from the attributed method.
Specifies how strings should be marshalled for generated p/invokes
Indicates the user is suppling a specific marshaller in .
Use the platform-provided UTF-8 marshaller.
Use the platform-provided UTF-16 marshaller.
Specifies that null is allowed as an input even if the corresponding type disallows it.
Specifies that null is disallowed as an input even if the corresponding type allows it.
Specifies that an output may be null even if the corresponding type disallows it.
Specifies that an output will not be null even if the corresponding type allows it. Specifies that an input argument was not null when the call returns.
Specifies that when a method returns , the parameter may be null even if the corresponding type disallows it.
Initializes the attribute with the specified return value condition.
The return value condition. If the method returns this value, the associated parameter may be null.
Gets the return value condition.
Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it.
Initializes the attribute with the specified return value condition.
The return value condition. If the method returns this value, the associated parameter will not be null.
Gets the return value condition.
Specifies that the output will be non-null if the named parameter is non-null.
Initializes the attribute with the associated parameter name.
The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null.
Gets the associated parameter name.
Applied to a method that will never return under any circumstance.
Specifies that the method will not return if the associated Boolean parameter is passed the specified value.
Initializes the attribute with the specified parameter value.
The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to
the associated parameter matches this value.
Gets the condition parameter value.
Specifies that the method or property will ensure that the listed field and property members have not-null values.
Initializes the attribute with a field or property member.
The field or property member that is promised to be not-null.
Initializes the attribute with the list of field and property members.
The list of field and property members that are promised to be not-null.
Gets field or property member names.
Specifies that the method or property will ensure that the listed field and property members have not-null values when returning with the specified return value condition.
Initializes the attribute with the specified return value condition and a field or property member.
The return value condition. If the method returns this value, the associated parameter will not be null.
The field or property member that is promised to be not-null.
Initializes the attribute with the specified return value condition and list of field and property members.
The return value condition. If the method returns this value, the associated parameter will not be null.
The list of field and property members that are promised to be not-null.
Gets the return value condition.
Gets field or property member names.