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, _
	password As String, _
	blockSize As Integer _
)
C#
public XtsStream(
	Stream baseStream,
	string password,
	int blockSize
)

Parameters

baseStream
Type: System.IO..::..Stream
The base stream that contains or will contain encrypted data in the Rebex XTS format.
password
Type: System..::..String
The password that is used to generate the encryption key.
blockSize
Type: System..::..Int32
The XTS algorithm block size in bytes. Must be multiple of 16. Default value is 65536. 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 password 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