ECDsa.SignData Método

Definição

Calcula o valor de hash dos dados especificados e o assina.Computes the hash value of the specified data and signs it.

Sobrecargas

SignData(Byte[], HashAlgorithmName)

Calcula o valor de hash da matriz de byte especificada usando o algoritmo de hash especificado e assina o valor de hash resultante.Computes the hash value of the specified byte array using the specified hash algorithm and signs the resulting hash value.

SignData(Stream, HashAlgorithmName)

Calcula o valor de hash do fluxo especificado usando o algoritmo de hash especificado e assina o valor de hash resultante.Computes the hash value of the specified stream using the specified hash algorithm and signs the resulting hash value.

SignData(Byte[], HashAlgorithmName, DSASignatureFormat)

Calcula o valor de hash dos dados especificados e os assina usando o formato de assinatura especificado.Computes the hash value of the specified data and signs it using the specified signature format.

SignData(Stream, HashAlgorithmName, DSASignatureFormat)

Calcula o valor de hash dos dados especificados e os assina usando o formato de assinatura especificado.Computes the hash value of the specified data and signs it using the specified signature format.

SignData(Byte[], Int32, Int32, HashAlgorithmName)

Calcula o valor de hash de uma parte da matriz de byte especificada usando o algoritmo de hash especificado e assina o valor de hash resultante.Computes the hash value of a portion of the specified byte array using the specified hash algorithm and signs the resulting hash value.

SignData(Byte[], Int32, Int32, HashAlgorithmName, DSASignatureFormat)

Calcula o valor de hash dos dados especificados e os assina usando o formato de assinatura especificado.Computes the hash value of the specified data and signs it using the specified signature format.

SignData(Byte[], HashAlgorithmName)

Calcula o valor de hash da matriz de byte especificada usando o algoritmo de hash especificado e assina o valor de hash resultante.Computes the hash value of the specified byte array using the specified hash algorithm and signs the resulting hash value.

public:
 virtual cli::array <System::Byte> ^ SignData(cli::array <System::Byte> ^ data, System::Security::Cryptography::HashAlgorithmName hashAlgorithm);
public virtual byte[] SignData (byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
abstract member SignData : byte[] * System.Security.Cryptography.HashAlgorithmName -> byte[]
override this.SignData : byte[] * System.Security.Cryptography.HashAlgorithmName -> byte[]
Public Overridable Function SignData (data As Byte(), hashAlgorithm As HashAlgorithmName) As Byte()

Parâmetros

data
Byte[]

Os dados de entrada para os quais o hash será calculado.The input data for which to compute the hash.

hashAlgorithm
HashAlgorithmName

O algoritmo de hash a ser usado para criar o valor de hash.The hash algorithm to use to create the hash value.

Retornos

Byte[]

A assinatura ECDSA para os dados especificados.The ECDSA signature for the specified data.

Exceções

data é null.data is null.

hashAlgorithm.NamehashAlgorithm.Name é null ou Empty.is null or Empty.

Aplica-se a

SignData(Stream, HashAlgorithmName)

Calcula o valor de hash do fluxo especificado usando o algoritmo de hash especificado e assina o valor de hash resultante.Computes the hash value of the specified stream using the specified hash algorithm and signs the resulting hash value.

public:
 virtual cli::array <System::Byte> ^ SignData(System::IO::Stream ^ data, System::Security::Cryptography::HashAlgorithmName hashAlgorithm);
public virtual byte[] SignData (System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
abstract member SignData : System.IO.Stream * System.Security.Cryptography.HashAlgorithmName -> byte[]
override this.SignData : System.IO.Stream * System.Security.Cryptography.HashAlgorithmName -> byte[]
Public Overridable Function SignData (data As Stream, hashAlgorithm As HashAlgorithmName) As Byte()

Parâmetros

data
Stream

O fluxo de entrada para o qual calcular o hash.The input stream for which to compute the hash.

hashAlgorithm
HashAlgorithmName

O algoritmo de hash a ser usado para criar o valor de hash.The hash algorithm to use to create the hash value.

Retornos

Byte[]

A assinatura ECDSA para os dados especificados.The ECDSA signature for the specified data.

Exceções

data é null.data is null.

hashAlgorithm.NamehashAlgorithm.Name é null ou Empty.is null or Empty.

Aplica-se a

SignData(Byte[], HashAlgorithmName, DSASignatureFormat)

Calcula o valor de hash dos dados especificados e os assina usando o formato de assinatura especificado.Computes the hash value of the specified data and signs it using the specified signature format.

public:
 cli::array <System::Byte> ^ SignData(cli::array <System::Byte> ^ data, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::DSASignatureFormat signatureFormat);
public byte[] SignData (byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat);
member this.SignData : byte[] * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.DSASignatureFormat -> byte[]
Public Function SignData (data As Byte(), hashAlgorithm As HashAlgorithmName, signatureFormat As DSASignatureFormat) As Byte()

Parâmetros

data
Byte[]

Os dados a serem assinados.The data to sign.

hashAlgorithm
HashAlgorithmName

O algoritmo de hash a ser usado para criar o valor de hash.The hash algorithm to use to create the hash value.

signatureFormat
DSASignatureFormat

O formato de codificação a ser usado na assinatura.The encoding format to use for the signature.

Retornos

Byte[]

A assinatura ECDSA para os dados especificados.The ECDSA signature for the specified data.

Exceções

data é null.data is null.

signatureFormat não é um formato conhecido.signatureFormat is not a known format.

hashAlgorithm tem um Name null ou vazio.hashAlgorithm has a null or empty Name.

Ocorreu um erro na operação de hash ou assinatura.An error occurred in the hashing or signing operation.

Aplica-se a

SignData(Stream, HashAlgorithmName, DSASignatureFormat)

Calcula o valor de hash dos dados especificados e os assina usando o formato de assinatura especificado.Computes the hash value of the specified data and signs it using the specified signature format.

public:
 cli::array <System::Byte> ^ SignData(System::IO::Stream ^ data, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::DSASignatureFormat signatureFormat);
public byte[] SignData (System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat);
member this.SignData : System.IO.Stream * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.DSASignatureFormat -> byte[]
Public Function SignData (data As Stream, hashAlgorithm As HashAlgorithmName, signatureFormat As DSASignatureFormat) As Byte()

Parâmetros

data
Stream

Os dados a serem assinados.The data to sign.

hashAlgorithm
HashAlgorithmName

O algoritmo de hash a ser usado para criar o valor de hash.The hash algorithm to use to create the hash value.

signatureFormat
DSASignatureFormat

O formato de codificação a ser usado na assinatura.The encoding format to use for the signature.

Retornos

Byte[]

A assinatura ECDSA para os dados especificados.The ECDSA signature for the specified data.

Exceções

data é null.data is null.

signatureFormat não é um formato conhecido.signatureFormat is not a known format.

hashAlgorithm tem um Name null ou vazio.hashAlgorithm has a null or empty Name.

Ocorreu um erro na operação de hash ou assinatura.An error occurred in the hashing or signing operation.

Aplica-se a

SignData(Byte[], Int32, Int32, HashAlgorithmName)

Calcula o valor de hash de uma parte da matriz de byte especificada usando o algoritmo de hash especificado e assina o valor de hash resultante.Computes the hash value of a portion of the specified byte array using the specified hash algorithm and signs the resulting hash value.

public:
 virtual cli::array <System::Byte> ^ SignData(cli::array <System::Byte> ^ data, int offset, int count, System::Security::Cryptography::HashAlgorithmName hashAlgorithm);
public virtual byte[] SignData (byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
abstract member SignData : byte[] * int * int * System.Security.Cryptography.HashAlgorithmName -> byte[]
override this.SignData : byte[] * int * int * System.Security.Cryptography.HashAlgorithmName -> byte[]
Public Overridable Function SignData (data As Byte(), offset As Integer, count As Integer, hashAlgorithm As HashAlgorithmName) As Byte()

Parâmetros

data
Byte[]

Os dados de entrada para os quais o hash será calculado.The input data for which to compute the hash.

offset
Int32

O deslocamento na matriz no qual os dados começarão a ser usados.The offset into the array at which to begin using data.

count
Int32

O número de bytes na matriz a ser usado como dados.The number of bytes in the array to use as data.

hashAlgorithm
HashAlgorithmName

O algoritmo de hash a ser usado para criar o valor de hash.The hash algorithm to use to create the hash value.

Retornos

Byte[]

A assinatura ECDSA para os dados especificados.The ECDSA signature for the specified data.

Exceções

data é null.data is null.

hashAlgorithm.NamehashAlgorithm.Name é null ou Empty.is null or Empty.

offset é menor que zero.offset is less than zero.

- ou --or- count é menor que zero.count is less than zero.

- ou --or- offset + count – 1 resulta em um índice que está além do limite superior de data.offset + count - 1 results in an index that is beyond the upper bound of data.

Aplica-se a

SignData(Byte[], Int32, Int32, HashAlgorithmName, DSASignatureFormat)

Calcula o valor de hash dos dados especificados e os assina usando o formato de assinatura especificado.Computes the hash value of the specified data and signs it using the specified signature format.

public:
 cli::array <System::Byte> ^ SignData(cli::array <System::Byte> ^ data, int offset, int count, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::DSASignatureFormat signatureFormat);
public byte[] SignData (byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat);
member this.SignData : byte[] * int * int * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.DSASignatureFormat -> byte[]
Public Function SignData (data As Byte(), offset As Integer, count As Integer, hashAlgorithm As HashAlgorithmName, signatureFormat As DSASignatureFormat) As Byte()

Parâmetros

data
Byte[]

Os dados a serem assinados.The data to sign.

offset
Int32

O deslocamento em data no qual iniciar o hash.The offset into data at which to begin hashing.

count
Int32

O número de bytes a serem lidos de data.The number of bytes to read from data.

hashAlgorithm
HashAlgorithmName

O algoritmo de hash a ser usado para criar o valor de hash.The hash algorithm to use to create the hash value.

signatureFormat
DSASignatureFormat

O formato de codificação a ser usado na assinatura.The encoding format to use for the signature.

Retornos

Byte[]

A assinatura ECDSA para os dados especificados.The ECDSA signature for the specified data.

Exceções

data é null.data is null.

signatureFormat não é um formato conhecido.signatureFormat is not a known format.

- ou --or- offset é menor que zero.offset is less than zero.

- ou --or- count é menor que zero.count is less than zero.

- ou --or- offset + count – 1 resulta em um índice que está além do limite superior de data.offset + count - 1 results in an index that is beyond the upper bound of data.

hashAlgorithm tem um Name null ou vazio.hashAlgorithm has a null or empty Name.

Ocorreu um erro na operação de hash ou assinatura.An error occurred in the hashing or signing operation.

Aplica-se a