Editare

Partajați prin


CryptographicOperations Class

Definition

Provides methods for use in working with cryptography to reduce the risk of side-channel information leakage.

public ref class CryptographicOperations abstract sealed
public static class CryptographicOperations
type CryptographicOperations = class
Public Class CryptographicOperations
Inheritance
CryptographicOperations

Methods

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

Determines the equality of two byte sequences in an amount of time that depends on the length of the sequences, but not their values.

HashData(HashAlgorithmName, Byte[])

Computes the hash of data.

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

Computes the hash of data.

HashData(HashAlgorithmName, ReadOnlySpan<Byte>)

Computes the hash of data.

HashData(HashAlgorithmName, Stream, Span<Byte>)

Computes the hash of a stream.

HashData(HashAlgorithmName, Stream)

Computes the hash of a stream.

HashDataAsync(HashAlgorithmName, Stream, CancellationToken)

Asynchronously computes the hash of a stream.

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

Asynchronously computes the hash of a stream.

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

Computes the HMAC of data.

HmacData(HashAlgorithmName, Byte[], Stream)

Computes the HMAC of a stream.

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

Computes the HMAC of data.

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

Computes the HMAC of data.

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

Computes the HMAC of a stream.

HmacData(HashAlgorithmName, ReadOnlySpan<Byte>, Stream)

Computes the HMAC of a stream.

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

Asynchronously computes the HMAC of a stream.

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

Asynchronously computes the HMAC of a stream.

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

Asynchronously computes the HMAC of a stream.

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

Attempts to compute the hash of data.

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

Attempts to compute the HMAC of data.

ZeroMemory(Span<Byte>)

Fills the provided buffer with zeros.

Applies to