Interface ISilverbackCryptoStreamFactory
The factory used to create the SilverbackCryptoStream implementation according to the IEncryptionSettings or IDecryptionSettings.
Namespace: Silverback.Messaging.Encryption
Assembly: Silverback.Integration.dll
Syntax
public interface ISilverbackCryptoStreamFactory
Methods
GetDecryptStream(Stream, IDecryptionSettings, string?)
Gets a SilverbackCryptoStream compatible with the specified settings.
Declaration
SilverbackCryptoStream GetDecryptStream(Stream stream, IDecryptionSettings settings, string? keyIdentifier = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | The inner Stream to read the encrypted message from. |
| IDecryptionSettings | settings | The IDecryptionSettings specifying the cryptographic algorithm settings. |
| string | keyIdentifier | The encryption key identifier that was submitted as header. |
Returns
| Type | Description |
|---|---|
| SilverbackCryptoStream | A SilverbackCryptoStream compatible with the specified settings. |
GetEncryptStream(Stream, IEncryptionSettings)
Gets a SilverbackCryptoStream compatible with the specified settings.
Declaration
SilverbackCryptoStream GetEncryptStream(Stream stream, IEncryptionSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | The inner Stream to read the clear-text message from. |
| IEncryptionSettings | settings | The IEncryptionSettings specifying the cryptographic algorithm settings. |
Returns
| Type | Description |
|---|---|
| SilverbackCryptoStream | A SilverbackCryptoStream compatible with the specified settings. |