Class SymmetricEncryptStream
The implementation of SilverbackCryptoStream based on a SymmetricAlgorithm used to encrypt the messages.
Inherited Members
Namespace: Silverback.Messaging.Encryption
Assembly: Silverback.Integration.dll
Syntax
public class SymmetricEncryptStream : SilverbackCryptoStream, IDisposable, IAsyncDisposable
Constructors
SymmetricEncryptStream(Stream, SymmetricEncryptionSettings)
Initializes a new instance of the SymmetricEncryptStream class.
Declaration
public SymmetricEncryptStream(Stream stream, SymmetricEncryptionSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | The inner Stream to read the clear-text message from. |
| SymmetricEncryptionSettings | settings | The SymmetricEncryptionSettings specifying the cryptographic algorithm settings. |
Properties
CryptoStream
Gets the underlying CryptoStream.
Declaration
protected override CryptoStream CryptoStream { get; }
Property Value
| Type | Description |
|---|---|
| CryptoStream |
Overrides
Methods
Dispose(bool)
The implementation of SilverbackCryptoStream based on a SymmetricAlgorithm used to encrypt the messages.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
Overrides
Read(byte[], int, int)
The implementation of SilverbackCryptoStream based on a SymmetricAlgorithm used to encrypt the messages.
Declaration
public override int Read(byte[] buffer, int offset, int count)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | buffer | |
| int | offset | |
| int | count |
Returns
| Type | Description |
|---|---|
| int |
Overrides
ReadAsync(byte[], int, int, CancellationToken)
The implementation of SilverbackCryptoStream based on a SymmetricAlgorithm used to encrypt the messages.
Declaration
public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | buffer | |
| int | offset | |
| int | count | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<int> |
Overrides
ReadAsync(Memory<byte>, CancellationToken)
The implementation of SilverbackCryptoStream based on a SymmetricAlgorithm used to encrypt the messages.
Declaration
public override ValueTask<int> ReadAsync(Memory<byte> buffer, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| Memory<byte> | buffer | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| ValueTask<int> |