RSACryptoServiceProvider.SignData Method (Stream, Object)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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.Extensions (in mscorlib.Extensions.dll)

Syntax

'Declaration
<SecuritySafeCriticalAttribute> _
Public Function SignData ( _
    inputStream As Stream, _
    halg As Object _
) As Byte()
[SecuritySafeCriticalAttribute]
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: array<System.Byte[]
The RSA signature for the specified data.

Exceptions

Exception Condition
ArgumentNullException

The halg parameter is nulla null reference (Nothing in Visual Basic).

ArgumentException

The halg parameter is not a valid type.

Remarks

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

Version Information

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.