RSACryptoServiceProvider: SignData

SignData

Signs data using the specified hash algorithm.



 Public Function SignData(
	  ByRef InputStreamOrBuffer As Variant,
	  ByRef hAlg As Variant,
	  Optional ByRef Offset As Variant,
	  Optional ByRef Count As Variant ) As Byte ( )

Parameters

InputStreamOrBuffer
[ByRef] Variant. The data to be signed. This can be a Stream object or a Byte Array.
hAlg
[ByRef] Variant. The hash algorithm to use for signing. Only MD5, SHA1, SHA256, SHA384, and SHA512 hashes are supported.
Offset
[ByRef] Optional. Variant. The starting index of a Byte array input source. This is ignored for Stream input sources.
Count
[ByRef] Optional. Variant. The number of bytes of a Byte array input source to process. This is ignored for Stream input sources.

Return Values

Byte() -  The signature of the data.

Remarks

The hash algorithms can be specified either by the OID string, the hash name, or an actual instance of a hash object that implements either the SHA1 or MD5 interface.

See Also

Project CorLib Overview

Class RSACryptoServiceProvider Overview

CryptoConfig

SHA1

MD5

SHA1CryptoServiceProvider

SHA1Manged

MD5CryptoServiceProvider