CryptographicOperations 类

定义

提供用于处理加密的方法,以减少侧通道信息泄漏的风险。

public ref class CryptographicOperations abstract sealed
public static class CryptographicOperations
type CryptographicOperations = class
Public Class CryptographicOperations
继承
CryptographicOperations

方法

FixedTimeEquals(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

确定两个字节序列的相等性,时间取决于序列的长度,而不是它们的值。

HashData(HashAlgorithmName, Byte[])

计算数据的哈希。

HashData(HashAlgorithmName, ReadOnlySpan<Byte>)

计算数据的哈希。

HashData(HashAlgorithmName, ReadOnlySpan<Byte>, Span<Byte>)

计算数据的哈希。

HashData(HashAlgorithmName, Stream)

计算流的哈希。

HashData(HashAlgorithmName, Stream, Span<Byte>)

计算流的哈希。

HashDataAsync(HashAlgorithmName, Stream, CancellationToken)

异步计算流的哈希。

HashDataAsync(HashAlgorithmName, Stream, Memory<Byte>, CancellationToken)

异步计算流的哈希。

HmacData(HashAlgorithmName, Byte[], Byte[])

计算数据的 HMAC。

HmacData(HashAlgorithmName, Byte[], Stream)

计算流的 HMAC。

HmacData(HashAlgorithmName, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

计算数据的 HMAC。

HmacData(HashAlgorithmName, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>)

计算数据的 HMAC。

HmacData(HashAlgorithmName, ReadOnlySpan<Byte>, Stream)

计算流的 HMAC。

HmacData(HashAlgorithmName, ReadOnlySpan<Byte>, Stream, Span<Byte>)

计算流的 HMAC。

HmacDataAsync(HashAlgorithmName, Byte[], Stream, CancellationToken)

异步计算流的 HMAC。

HmacDataAsync(HashAlgorithmName, ReadOnlyMemory<Byte>, Stream, CancellationToken)

异步计算流的 HMAC。

HmacDataAsync(HashAlgorithmName, ReadOnlyMemory<Byte>, Stream, Memory<Byte>, CancellationToken)

异步计算流的 HMAC。

TryHashData(HashAlgorithmName, ReadOnlySpan<Byte>, Span<Byte>, Int32)

尝试计算数据的哈希。

TryHmacData(HashAlgorithmName, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, Int32)

尝试计算数据的 HMAC。

ZeroMemory(Span<Byte>)

用零填充提供的缓冲区。

适用于