RSACryptoServiceProvider.SignData Method (Stream, Object)

July 28, 2014

Computes the hash value of the specified input stream using the specified hash algorithm, and signs the resulting hash value.

Namespace:  System.Security.Cryptography
Assembly:  mscorlib (in mscorlib.dll)

public byte[] SignData(
	Stream inputStream,
	Object halg
)

Parameters

inputStream
Type: System.IO.Stream
The input data for which to compute the hash.
halg
Type: System.Object
The hash algorithm to use to create the hash value.

Return Value

Type: System.Byte []
The RSA signature for the specified data.

ExceptionCondition
ArgumentNullException

The halg parameter is null.

ArgumentException

The halg parameter is not a valid type.

The halg parameter can accept a String, a HashAlgorithm, or a Type.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2014 Microsoft