Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

XtsStream Constructor

Namespace: Rebex.Security
Assembly: Rebex.Security.dll (version 7.0.9147)

XtsStream(String, String)

Initializes a new instance of the XtsStream class.

Declaration
public XtsStream(string filePath, string password)
Parameters
Type Name Description
String filePath

The base stream that contains or will contain encrypted data in the Rebex XTS format.

String password

The password that is used to generate the encryption key.

Exceptions
Type Condition
NotSupportedException

filePath is not readable or seekable.

ArgumentNullException

filePath or password is null.

XtsStream(String, Byte[])

Initializes a new instance of the XtsStream class.

Declaration
public XtsStream(string filePath, byte[] password)
Parameters
Type Name Description
String filePath

The base stream that contains or will contain encrypted data in the Rebex XTS format.

Byte[] password

The password that is used to generate the encryption key.

Exceptions
Type Condition
NotSupportedException

filePath is not readable or seekable.

ArgumentNullException

filePath or password is null.

XtsStream(String, String, XtsSettings)

Initializes a new instance of the XtsStream class.

Declaration
public XtsStream(string filePath, string password, XtsSettings settings)
Parameters
Type Name Description
String filePath

The base stream that contains or will contain encrypted data in the Rebex XTS format.

String password

The password that is used to generate the encryption key.

XtsSettings settings

XTS settings.

Exceptions
Type Condition
NotSupportedException

filePath is not readable or seekable.

ArgumentNullException

filePath or password is null.

XtsStream(String, Byte[], XtsSettings)

Initializes a new instance of the XtsStream class.

Declaration
public XtsStream(string filePath, byte[] password, XtsSettings settings)
Parameters
Type Name Description
String filePath

The base stream that contains or will contain encrypted data in the Rebex XTS format.

Byte[] password

The password that is used to generate the encryption key.

XtsSettings settings

XTS settings.

Exceptions
Type Condition
NotSupportedException

filePath is not readable or seekable.

ArgumentNullException

filePath or password is null.

XtsStream(String, AsymmetricKeyAlgorithm, XtsSettings)

Initializes a new instance of the XtsStream class.

Declaration
public XtsStream(string filePath, AsymmetricKeyAlgorithm key, XtsSettings settings)
Parameters
Type Name Description
String filePath

The base stream that contains or will contain encrypted data in the Rebex XTS format.

AsymmetricKeyAlgorithm key

The public key used to encrypt a randomly-generated password.

XtsSettings settings

XTS settings.

Exceptions
Type Condition
NotSupportedException

filePath is not readable or seekable.

ArgumentNullException

filePath is null.

XtsStream(Stream, String)

Initializes a new instance of the XtsStream class.

Declaration
public XtsStream(Stream baseStream, string password)
Parameters
Type Name Description
Stream baseStream

The base stream that contains or will contain encrypted data in the Rebex XTS format.

String password

The password that is used to generate the encryption key.

Exceptions
Type Condition
NotSupportedException

baseStream is not readable or seekable.

ArgumentNullException

baseStream or password is null.

XtsStream(Stream, Byte[])

Initializes a new instance of the XtsStream class.

Declaration
public XtsStream(Stream baseStream, byte[] password)
Parameters
Type Name Description
Stream baseStream

The base stream that contains or will contain encrypted data in the Rebex XTS format.

Byte[] password

The password that is used to generate the encryption key.

Exceptions
Type Condition
NotSupportedException

baseStream is not readable or seekable.

ArgumentNullException

baseStream or password is null.

XtsStream(Stream, String, XtsSettings)

Initializes a new instance of the XtsStream class.

Declaration
public XtsStream(Stream baseStream, string password, XtsSettings settings)
Parameters
Type Name Description
Stream baseStream

The base stream that contains or will contain encrypted data in the Rebex XTS format.

String password

The password that is used to generate the encryption key.

XtsSettings settings

XTS settings.

Exceptions
Type Condition
NotSupportedException

baseStream is not readable or seekable.

ArgumentNullException

baseStream or password is null.

XtsStream(Stream, Byte[], XtsSettings)

Initializes a new instance of the XtsStream class.

Declaration
public XtsStream(Stream baseStream, byte[] password, XtsSettings settings)
Parameters
Type Name Description
Stream baseStream

The base stream that contains or will contain encrypted data in the Rebex XTS format.

Byte[] password

The password that is used to generate the encryption key.

XtsSettings settings

XTS settings.

Exceptions
Type Condition
NotSupportedException

baseStream is not readable or seekable.

ArgumentNullException

baseStream or password is null.

XtsStream(Stream, PublicKeyInfo, XtsSettings)

Initializes a new instance of the XtsStream class.

Declaration
public XtsStream(Stream baseStream, PublicKeyInfo key, XtsSettings settings)
Parameters
Type Name Description
Stream baseStream

The base stream that contains or will contain encrypted data in the Rebex XTS format.

PublicKeyInfo key

The public key used to encrypt a randomly-generated password.

XtsSettings settings

XTS settings.

Exceptions
Type Condition
NotSupportedException

baseStream is not readable or seekable.

ArgumentNullException

baseStream or key is null.

XtsStream(Stream, PrivateKeyInfo, XtsSettings)

Initializes a new instance of the XtsStream class.

Declaration
public XtsStream(Stream baseStream, PrivateKeyInfo key, XtsSettings settings)
Parameters
Type Name Description
Stream baseStream

The base stream that contains or will contain encrypted data in the Rebex XTS format.

PrivateKeyInfo key

The private key used to encrypt or decrypt a randomly-generated password.

XtsSettings settings

XTS settings.

Exceptions
Type Condition
NotSupportedException

baseStream is not readable or seekable.

ArgumentNullException

baseStream or key is null.

XtsStream(Stream, AsymmetricKeyAlgorithm, XtsSettings)

Initializes a new instance of the XtsStream class.

Declaration
public XtsStream(Stream baseStream, AsymmetricKeyAlgorithm key, XtsSettings settings)
Parameters
Type Name Description
Stream baseStream

The base stream that contains or will contain encrypted data in the Rebex XTS format.

AsymmetricKeyAlgorithm key

The public or private key used to encrypt or decrypt a randomly-generated password.

XtsSettings settings

XTS settings.

Exceptions
Type Condition
NotSupportedException

baseStream is not readable or seekable.

ArgumentNullException

baseStream or key is null.

XtsStream(Stream, String, Int32)

Initializes a new instance of the XtsStream class.

Declaration
public XtsStream(Stream baseStream, string password, int blockSize = 65536)
Parameters
Type Name Description
Stream baseStream

The base stream that contains or will contain encrypted data in the Rebex XTS format.

String password

The password that is used to generate the encryption key.

Int32 blockSize

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
Type Condition
NotSupportedException

baseStream is not readable or seekable.

ArgumentNullException

baseStream or password is null.

ArgumentException

blockSize is negative, zero or not multiple of 16.

XtsStream(Stream, Byte[], Int32)

Initializes a new instance of the XtsStream class.

Declaration
public XtsStream(Stream baseStream, byte[] password, int blockSize = 65536)
Parameters
Type Name Description
Stream baseStream

The base stream that contains or will contain encrypted data in the Rebex XTS format.

Byte[] password

The password that is used to generate the encryption key.

Int32 blockSize

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
Type Condition
NotSupportedException

baseStream is not readable or seekable.

ArgumentNullException

baseStream or password is null.

ArgumentException

blockSize is negative, zero or not multiple of 16.

XtsStream(Stream, PublicKeyInfo, Int32)

Initializes a new instance of the XtsStream class.

Declaration
public XtsStream(Stream baseStream, PublicKeyInfo key, int blockSize = 65536)
Parameters
Type Name Description
Stream baseStream

The base stream that contains or will contain encrypted data in the Rebex XTS format.

PublicKeyInfo key

The public key used to encrypt a randomly-generated password.

Int32 blockSize

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
Type Condition
NotSupportedException

baseStream is not readable or seekable.

ArgumentNullException

baseStream or key is null.

ArgumentException

blockSize is negative, zero or not multiple of 16.

XtsStream(Stream, PrivateKeyInfo, Int32)

Initializes a new instance of the XtsStream class.

Declaration
public XtsStream(Stream baseStream, PrivateKeyInfo key, int blockSize = 65536)
Parameters
Type Name Description
Stream baseStream

The base stream that contains or will contain encrypted data in the Rebex XTS format.

PrivateKeyInfo key

The private key used to encrypt or decrypt a randomly-generated password.

Int32 blockSize

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
Type Condition
NotSupportedException

baseStream is not readable or seekable.

ArgumentNullException

baseStream or key is null.

ArgumentException

blockSize is negative, zero or not multiple of 16.

XtsStream(Stream, AsymmetricKeyAlgorithm, Int32)

Initializes a new instance of the XtsStream class.

Declaration
public XtsStream(Stream baseStream, AsymmetricKeyAlgorithm key, int blockSize = 65536)
Parameters
Type Name Description
Stream baseStream

The base stream that contains or will contain encrypted data in the Rebex XTS format.

AsymmetricKeyAlgorithm key

The public or private key used to encrypt or decrypt a randomly-generated password.

Int32 blockSize

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
Type Condition
NotSupportedException

baseStream is not readable or seekable.

ArgumentNullException

baseStream or key is null.

ArgumentException

blockSize is negative, zero or not multiple of 16.

In This Article
  • XtsStream(String, String)
  • XtsStream(String, Byte[])
  • XtsStream(String, String, XtsSettings)
  • XtsStream(String, Byte[], XtsSettings)
  • XtsStream(String, AsymmetricKeyAlgorithm, XtsSettings)
  • XtsStream(Stream, String)
  • XtsStream(Stream, Byte[])
  • XtsStream(Stream, String, XtsSettings)
  • XtsStream(Stream, Byte[], XtsSettings)
  • XtsStream(Stream, PublicKeyInfo, XtsSettings)
  • XtsStream(Stream, PrivateKeyInfo, XtsSettings)
  • XtsStream(Stream, AsymmetricKeyAlgorithm, XtsSettings)
  • XtsStream(Stream, String, Int32)
  • XtsStream(Stream, Byte[], Int32)
  • XtsStream(Stream, PublicKeyInfo, Int32)
  • XtsStream(Stream, PrivateKeyInfo, Int32)
  • XtsStream(Stream, AsymmetricKeyAlgorithm, Int32)
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies