Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​Security.​Cryptography.​IncrementalHash
Assembly: System.Security.Cryptography
Inheritance: object → IncrementalHash
Provides support for computing a hash or HMAC value incrementally across several segments.
Properties
public
HashAlgorithmName
AlgorithmName
Get the name of the algorithm being performed.
public
int
HashLengthInBytes
Gets the output size of this hash or HMAC algorithm, in bytes.
Methods
public
void
AppendData​(byte[] data)
data
The data to process.
Append the entire contents of <paramref name="data" /> to the data already processed in the hash or HMAC.
public
void
AppendData​(byte[] data,
int offset,
int count)
data
The data to process.
offset
The offset into the byte array from which to begin using data.
count
The number of bytes in the array to use as data.
Append <paramref name="count" /> bytes of <paramref name="data" /> , starting at <paramref name="offset" /> ,
to the data already processed in the hash or HMAC.
Creates a new instance of <see cref="T:System.Security.Cryptography.IncrementalHash" /> with the existing appended data preserved.
public
void
Dispose​()
Release all resources used by the current instance of the
<see cref="T:System.Security.Cryptography.IncrementalHash" /> class.
public
byte[]
GetCurrentHash​() Returns The computed hash or HMAC.
Retrieves the hash or Hash-based Message Authentication Code (HMAC) for the data accumulated from prior calls to the <see cref="M:System.Security.Cryptography.IncrementalHash.AppendData(System.ReadOnlySpan{System.Byte})" /> methods, without resetting the object to its initial state.
public
byte[]
GetHashAndReset​() Returns The computed hash or HMAC.
Retrieve the hash or HMAC for the data accumulated from prior calls to
<see cref="M:System.Security.Cryptography.IncrementalHash.AppendData(System.Byte[])" /> , and return to the state the object
was in at construction.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object