Initializes a new instance of the XtsStream class.

Namespace:  Rebex.Security
Assembly:  Rebex.Security (in Rebex.Security.dll)

Syntax

Visual Basic
Public Sub New ( _
	baseStream As Stream, _
	key As AsymmetricKeyAlgorithm, _
	blockSize As Integer _
)
C#
public XtsStream(
	Stream baseStream,
	AsymmetricKeyAlgorithm key,
	int blockSize
)

Parameters

baseStream
Type: System.IO..::..Stream
The base stream that contains or will contain encrypted data in the Rebex XTS format.
key
Type: Rebex.Security.Cryptography..::..AsymmetricKeyAlgorithm
The public or private key used to encrypt or decrypt a randomly-generated password.
blockSize
Type: System..::..Int32
The XTS algorithm block size in bytes. Must be multiple of 16. Default value is 65536, maximum number is 1048576. Use smaller buffer if you read very small parts of a stream from different places, or use larger buffer if you do sequential reads of large blocks. Setting this value might negatively impact the performance.

Exceptions

ExceptionCondition
System..::..NotSupportedExceptionbaseStream is not readable or seekable.
System..::..ArgumentNullExceptionbaseStream or key is null.
System..::..ArgumentExceptionblockSize is negative, zero or not multiple of 16.

Version Information

.NET Compact Framework

Supported in: 3.9, 3.5

See Also