SetInputStream Method
Sets the stream from which the component will read data to encode or decode.
Syntax
[VB.NET] Public Sub SetInputStream(ByVal InputStream As System.IO.Stream)
[C#] public void SetInputStream(System.IO.Stream inputStream);
Remarks
This method sets the stream from which the component will read data to encode or decode. If an input stream is set before the component attempts to encode or decode an S/MIME message, the data is read from the input stream instead of from the Message property.
To sign and/or encrypt a stream, first set the input stream by calling this method, specifying the stream that you would like to sign and/or encrypt. Then call Sign, Encrypt, or SignAndEncrypt to sign and/or encrypt the message. The appropriate MIME headers will be generated in MessageHeaders.
If you would like to decrypt a stream or verify it's signature you should call this method to specify a valid input stream which contains the signed and/or encrypted data you would like to verify or decrypt. Then call VerifySignature, Decrypt, or DecryptAndVerifySignature to verify and/or decrypt the message.
The content of the stream will be read from the current position all the way to the end and no bytes will be skipped.