DSA.SignData Метод
Определение
Вычисляет хэш-значение указанных данных и подписывает его.Computes the hash value of the specified data and signs it.
Перегрузки
SignData(Byte[], HashAlgorithmName) |
Вычисляет хэш-значение заданного массива байтов с помощью указанного алгоритма хэширования и подписывает результирующее хэш-значение.Computes the hash value of the specified byte array using the specified hash algorithm and signs the resulting hash value. |
SignData(Stream, HashAlgorithmName) |
Вычисляет хэш-значение заданного потока с помощью указанного алгоритма хэширования и подписывает результирующее хэш-значение.Computes the hash value of the specified stream using the specified hash algorithm and signs the resulting hash value. |
SignData(Byte[], HashAlgorithmName, DSASignatureFormat) |
Выполняет вычисление хэш-значения указанных данных и подписывает его с использованием указанного формата сигнатуры.Computes the hash value of the specified data and signs it using the specified signature format. |
SignData(Stream, HashAlgorithmName, DSASignatureFormat) |
Выполняет вычисление хэш-значения указанных данных и подписывает его с использованием указанного формата сигнатуры.Computes the hash value of the specified data and signs it using the specified signature format. |
SignData(Byte[], Int32, Int32, HashAlgorithmName) |
Вычисляет хэш-значение фрагмента заданного массива байтов с помощью указанного алгоритма хэширования и подписывает результирующее хэш-значение.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) |
Выполняет вычисление хэш-значения указанных данных и подписывает его с использованием указанного формата сигнатуры.Computes the hash value of the specified data and signs it using the specified signature format. |
SignData(Byte[], HashAlgorithmName)
Вычисляет хэш-значение заданного массива байтов с помощью указанного алгоритма хэширования и подписывает результирующее хэш-значение.Computes the hash value of the specified byte array using the specified hash algorithm and signs the resulting hash value.
public:
cli::array <System::Byte> ^ SignData(cli::array <System::Byte> ^ data, System::Security::Cryptography::HashAlgorithmName hashAlgorithm);
public byte[] SignData (byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
member this.SignData : byte[] * System.Security.Cryptography.HashAlgorithmName -> byte[]
Public Function SignData (data As Byte(), hashAlgorithm As HashAlgorithmName) As Byte()
Параметры
- data
- Byte[]
Входные данные, для которых нужно вычислить хэш.The input data for which to compute the hash.
- hashAlgorithm
- HashAlgorithmName
Хэш-алгоритм, который следует использовать для создания хэш-значения.The hash algorithm to use to create the hash value.
Возвращаемое значение
- Byte[]
Подпись DSA для указанных данных.The DSA signature for the specified data.
Исключения
data
имеет значение null
.data
is null
.
Применяется к
SignData(Stream, HashAlgorithmName)
Вычисляет хэш-значение заданного потока с помощью указанного алгоритма хэширования и подписывает результирующее хэш-значение.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()
Параметры
- data
- Stream
Входной поток, для которого нужно вычислить хэш.The input stream for which to compute the hash.
- hashAlgorithm
- HashAlgorithmName
Хэш-алгоритм, который следует использовать для создания хэш-значения.The hash algorithm to use to create the hash value.
Возвращаемое значение
- Byte[]
Подпись DSA для указанных данных.The DSA signature for the specified data.
Исключения
data
имеет значение null
.data
is null
.
Применяется к
SignData(Byte[], HashAlgorithmName, DSASignatureFormat)
Выполняет вычисление хэш-значения указанных данных и подписывает его с использованием указанного формата сигнатуры.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()
Параметры
- data
- Byte[]
Подписываемые данные.The data to sign.
- hashAlgorithm
- HashAlgorithmName
Хэш-алгоритм, который следует использовать для создания хэш-значения.The hash algorithm to use to create the hash value.
- signatureFormat
- DSASignatureFormat
Формат кодирования, используемый для подписи.The encoding format to use for the signature.
Возвращаемое значение
- Byte[]
Подпись DSA для указанных данных.The DSA signature for the specified data.
Исключения
data
имеет значение null
.data
is null
.
signatureFormat
не является известным форматом.signatureFormat
is not a known format.
Произошла ошибка в операции хэширования или подписывания.An error occurred in the hashing or signing operation.
Применяется к
SignData(Stream, HashAlgorithmName, DSASignatureFormat)
Выполняет вычисление хэш-значения указанных данных и подписывает его с использованием указанного формата сигнатуры.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()
Параметры
- data
- Stream
Подписываемые данные.The data to sign.
- hashAlgorithm
- HashAlgorithmName
Хэш-алгоритм, который следует использовать для создания хэш-значения.The hash algorithm to use to create the hash value.
- signatureFormat
- DSASignatureFormat
Формат кодирования, используемый для подписи.The encoding format to use for the signature.
Возвращаемое значение
- Byte[]
Подпись DSA для указанных данных.The DSA signature for the specified data.
Исключения
data
имеет значение null
.data
is null
.
signatureFormat
не является известным форматом.signatureFormat
is not a known format.
Произошла ошибка в операции хэширования или подписывания.An error occurred in the hashing or signing operation.
Применяется к
SignData(Byte[], Int32, Int32, HashAlgorithmName)
Вычисляет хэш-значение фрагмента заданного массива байтов с помощью указанного алгоритма хэширования и подписывает результирующее хэш-значение.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()
Параметры
- data
- Byte[]
Входные данные, для которых нужно вычислить хэш.The input data for which to compute the hash.
- offset
- Int32
Смещение в массиве, начиная с которого следует использовать данные.The offset into the array at which to begin using data.
- count
- Int32
Число байтов в массиве для использования в качестве данных.The number of bytes in the array to use as data.
- hashAlgorithm
- HashAlgorithmName
Хэш-алгоритм, который следует использовать для создания хэш-значения.The hash algorithm to use to create the hash value.
Возвращаемое значение
- Byte[]
Подпись DSA для указанных данных.The DSA signature for the specified data.
Исключения
data
имеет значение null
.data
is null
.
Значение параметра offset
меньше нуля.offset
is less than zero.
-или--or-
Значение параметра count
меньше нуля.count
is less than zero.
- или --or-
offset
+ count
— 1 приводит к получению значения индекса, который выходит за пределы верхней границы data
.offset
+ count
- 1 results in an index that is beyond the upper bound of data
.
Применяется к
SignData(Byte[], Int32, Int32, HashAlgorithmName, DSASignatureFormat)
Выполняет вычисление хэш-значения указанных данных и подписывает его с использованием указанного формата сигнатуры.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()
Параметры
- data
- Byte[]
Подписываемые данные.The data to sign.
- offset
- Int32
Смещение в data
, с которого начинается хэширование.The offset into data
at which to begin hashing.
- count
- Int32
Число байтов, читаемых из объекта data
.The number of bytes to read from data
.
- hashAlgorithm
- HashAlgorithmName
Хэш-алгоритм, который следует использовать для создания хэш-значения.The hash algorithm to use to create the hash value.
- signatureFormat
- DSASignatureFormat
Формат кодирования, используемый для подписи.The encoding format to use for the signature.
Возвращаемое значение
- Byte[]
Подпись DSA для указанных данных.The DSA signature for the specified data.
Исключения
data
имеет значение null
.data
is null
.
signatureFormat
не является известным форматом.signatureFormat
is not a known format.
или offset
меньше нуля.-or- offset
is less than zero.
или count
меньше нуля.-or- count
is less than zero.
или offset
+ count
— 1 приводит к получению значения индекса, который выходит за пределы верхней границы data
.-or- offset
+ count
- 1 results in an index that is beyond the upper bound of data
.
Произошла ошибка в операции хэширования или подписывания.An error occurred in the hashing or signing operation.