DSA::SignData Method (array<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.
Assembly: mscorlib (in mscorlib.dll)
public: virtual array<unsigned char>^ SignData( array<unsigned char>^ data, int offset, int count, HashAlgorithmName hashAlgorithm )
Parameters
- data
-
Type:
array<System::Byte>^
The input data for which to compute the hash.
- offset
-
Type:
System::Int32
The offset into the array at which to begin using data.
- count
-
Type:
System::Int32
The number of bytes in the array to use as data.
- hashAlgorithm
-
Type:
System.Security.Cryptography::HashAlgorithmName
The hash algorithm to use to create the hash value.
| Exception | Condition |
|---|---|
| ArgumentNullException | data is null. |
| ArgumentException | hashAlgorithm.Name is null or String::Empty. |
| ArgumentOutOfRangeException | offset is less than zero. -or- count is less than zero. -or- offset + count – 1 results in an index that is beyond the upper bound of data. |
Available since 4.6.2