MLDsa.SignPreHash Método

Definição

Sobrecargas

Nome Description
SignPreHash(ReadOnlySpan<Byte>, Span<Byte>, String, ReadOnlySpan<Byte>)

Assina o hash especificado usando o algoritmo de assinatura pré-hash FIPS 204, gravando a assinatura no buffer fornecido.

SignPreHash(Byte[], String, Byte[])

Assina o hash especificado usando o algoritmo de assinatura pré-hash FIPS 204.

SignPreHash(ReadOnlySpan<Byte>, Span<Byte>, String, ReadOnlySpan<Byte>)

Origem:
MLDsa.cs
Origem:
MLDsa.cs
Origem:
MLDsa.cs

Assina o hash especificado usando o algoritmo de assinatura pré-hash FIPS 204, gravando a assinatura no buffer fornecido.

[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public void SignPreHash(ReadOnlySpan<byte> hash, Span<byte> destination, string hashAlgorithmOid, ReadOnlySpan<byte> context = default);
public void SignPreHash(ReadOnlySpan<byte> hash, Span<byte> destination, string hashAlgorithmOid, ReadOnlySpan<byte> context = default);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.SignPreHash : ReadOnlySpan<byte> * Span<byte> * string * ReadOnlySpan<byte> -> unit
member this.SignPreHash : ReadOnlySpan<byte> * Span<byte> * string * ReadOnlySpan<byte> -> unit
Public Sub SignPreHash (hash As ReadOnlySpan(Of Byte), destination As Span(Of Byte), hashAlgorithmOid As String, Optional context As ReadOnlySpan(Of Byte) = Nothing)

Parâmetros

hash
ReadOnlySpan<Byte>

O hash a ser assinado.

destination
Span<Byte>

O buffer para receber a assinatura. Seu comprimento deve ser exatamente SignatureSizeInBytes.

hashAlgorithmOid
String

O OID do algoritmo de hash usado para criar o hash.

context
ReadOnlySpan<Byte>

Um valor específico de contexto opcional para limitar o escopo da assinatura.

O valor padrão é um buffer vazio.

Atributos

Exceções

hashAlgorithmOid é null.

O buffer é destination o comprimento incorreto para receber a assinatura.

context tem um Length número superior a 255 bytes.

Esta instância foi descartada.

hashAlgorithmOid não é uma OID bem formada.

- ou -

hashAlgorithmOid é um algoritmo bem conhecido e hash não tem o comprimento esperado.

- ou -

A instância representa apenas uma chave pública.

- ou -

Erro ao assinar o hash.

Aplica-se a

SignPreHash(Byte[], String, Byte[])

Origem:
MLDsa.cs
Origem:
MLDsa.cs
Origem:
MLDsa.cs

Assina o hash especificado usando o algoritmo de assinatura pré-hash FIPS 204.

[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public byte[] SignPreHash(byte[] hash, string hashAlgorithmOid, byte[]? context = default);
public byte[] SignPreHash(byte[] hash, string hashAlgorithmOid, byte[]? context = default);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.SignPreHash : byte[] * string * byte[] -> byte[]
member this.SignPreHash : byte[] * string * byte[] -> byte[]
Public Function SignPreHash (hash As Byte(), hashAlgorithmOid As String, Optional context As Byte() = Nothing) As Byte()

Parâmetros

hash
Byte[]

O hash a ser assinado.

hashAlgorithmOid
String

O OID do algoritmo de hash usado para criar o hash.

context
Byte[]

Um valor específico de contexto opcional para limitar o escopo da assinatura.

O valor padrão é null.

Retornos

Byte[]
Atributos

Exceções

hash ou hashAlgorithmOid é null.

Erro ao verificar os dados.

hashAlgorithmOid não é uma OID bem formada.

- ou -

hashAlgorithmOid é um algoritmo bem conhecido e hash não tem o comprimento esperado.

- ou -

A instância representa apenas uma chave pública.

- ou -

Erro ao assinar o hash.

Aplica-se a