NonCryptographicHashAlgorithm 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示非加密哈希算法。
public ref class NonCryptographicHashAlgorithm abstract
public abstract class NonCryptographicHashAlgorithm
type NonCryptographicHashAlgorithm = class
Public MustInherit Class NonCryptographicHashAlgorithm
- 继承
-
NonCryptographicHashAlgorithm
- 派生
构造函数
| 名称 | 说明 |
|---|---|
| NonCryptographicHashAlgorithm(Int32) |
从派生类中的构造函数调用以初始化 NonCryptographicHashAlgorithm 类。 |
属性
| 名称 | 说明 |
|---|---|
| HashLengthInBytes |
获取由此哈希算法生成的字节数。 |
方法
| 名称 | 说明 |
|---|---|
| Append(Byte[]) |
将已处理的数据的内容 |
| Append(ReadOnlySpan<Byte>) |
在派生类中重写时,将已处理的数据的内容 |
| Append(Stream) |
将已处理的数据的内容 |
| AppendAsync(Stream, CancellationToken) |
异步读取 |
| GetCurrentHash() |
获取当前计算的哈希值,而不修改累积状态。 |
| GetCurrentHash(Span<Byte>) |
将计算的哈希值 |
| GetCurrentHashCore(Span<Byte>) |
在派生类中重写时,将计算的哈希值 |
| GetHashAndReset() |
获取当前计算的哈希值并清除累积状态。 |
| GetHashAndReset(Span<Byte>) |
写入计算的哈希值,然后 |
| GetHashAndResetCore(Span<Byte>) |
写入计算的哈希值,然后 |
| GetHashCode() |
已过时.
此方法不受支持,不应调用。 呼叫 GetCurrentHash() 或 GetHashAndReset() 改为。 |
| Reset() |
在派生类中重写时,将哈希计算重置为初始状态。 |
| TryGetCurrentHash(Span<Byte>, Int32) |
尝试在不修改累积状态的情况下将计算的哈希值写入到该哈希值 |
| TryGetHashAndReset(Span<Byte>, Int32) |
尝试将计算的哈希值 |