Class SilverbackCryptoStreamFactory
The factory used to create the SilverbackCryptoStream implementation according to the IEncryptionSettings or IDecryptionSettings.
Implements
Inherited Members
Namespace: Silverback.Messaging.Encryption
Assembly: Silverback.Integration.dll
Syntax
public class SilverbackCryptoStreamFactory : ISilverbackCryptoStreamFactory
Constructors
SilverbackCryptoStreamFactory()
The factory used to create the SilverbackCryptoStream implementation according to the IEncryptionSettings or IDecryptionSettings.
Declaration
public SilverbackCryptoStreamFactory()
Methods
GetDecryptStream(Stream, IDecryptionSettings, string?)
Gets a SilverbackCryptoStream compatible with the specified settings.
Declaration
public 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
public 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. |