DSACryptoServiceProvider.SignData Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Computes the hash value of the specified data and signs it.
SignData(Byte[]) |
Computes the hash value of the specified byte array and signs the resulting hash value. |
SignData(Stream) |
Computes the hash value of the specified input stream and signs the resulting hash value. |
SignData(Byte[], Int32, Int32) |
Signs a byte array from the specified start point to the specified end point. |
Computes the hash value of the specified byte array and signs the resulting hash value.
public:
cli::array <System::Byte> ^ SignData(cli::array <System::Byte> ^ buffer);
public byte[] SignData(byte[] buffer);
override this.SignData : byte[] -> byte[]
member this.SignData : byte[] -> byte[]
Public Function SignData (buffer As Byte()) As Byte()
Parameters
- buffer
- Byte[]
The input data for which to compute the hash.
Returns
The DSA signature for the specified data.
Remarks
This method creates a digital signature that is verified using the VerifyData method.
DSA uses the SHA1 hash algorithm.
See also
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
Computes the hash value of the specified input stream and signs the resulting hash value.
public:
cli::array <System::Byte> ^ SignData(System::IO::Stream ^ inputStream);
public byte[] SignData(System.IO.Stream inputStream);
override this.SignData : System.IO.Stream -> byte[]
member this.SignData : System.IO.Stream -> byte[]
Public Function SignData (inputStream As Stream) As Byte()
Parameters
- inputStream
- Stream
The input data for which to compute the hash.
Returns
The DSA signature for the specified data.
Remarks
DSA uses the SHA1 hash algorithm.
See also
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
Signs a byte array from the specified start point to the specified end point.
public:
cli::array <System::Byte> ^ SignData(cli::array <System::Byte> ^ buffer, int offset, int count);
public byte[] SignData(byte[] buffer, int offset, int count);
override this.SignData : byte[] * int * int -> byte[]
member this.SignData : byte[] * int * int -> byte[]
Public Function SignData (buffer As Byte(), offset As Integer, count As Integer) As Byte()
Parameters
- buffer
- Byte[]
The input data to sign.
- offset
- Int32
The offset into the array from which to begin using data.
- count
- Int32
The number of bytes in the array to use as data.
Returns
The DSA signature for the specified data.
Remarks
This method creates a digital signature that is verified using the VerifyData method.
DSA uses the SHA1 hash algorithm.
See also
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: