Table of Contents

Interface ISilverbackCryptoStreamFactory

Namespace
Silverback.Messaging.Encryption
Assembly
Silverback.Integration.dll

The factory used to create the SilverbackCryptoStream implementation according to the IEncryptionSettings or IDecryptionSettings.

public interface ISilverbackCryptoStreamFactory

Methods

GetDecryptStream(Stream, IDecryptionSettings, string?)

Gets a SilverbackCryptoStream compatible with the specified settings.

SilverbackCryptoStream GetDecryptStream(Stream stream, IDecryptionSettings settings, string? keyIdentifier = null)

Parameters

stream Stream

The inner Stream to read the encrypted message from.

settings IDecryptionSettings

The IDecryptionSettings specifying the cryptographic algorithm settings.

keyIdentifier string

The encryption key identifier that was submitted as header.

Returns

SilverbackCryptoStream

A SilverbackCryptoStream compatible with the specified settings.

GetEncryptStream(Stream, IEncryptionSettings)

Gets a SilverbackCryptoStream compatible with the specified settings.

SilverbackCryptoStream GetEncryptStream(Stream stream, IEncryptionSettings settings)

Parameters

stream Stream

The inner Stream to read the clear-text message from.

settings IEncryptionSettings

The IEncryptionSettings specifying the cryptographic algorithm settings.

Returns

SilverbackCryptoStream

A SilverbackCryptoStream compatible with the specified settings.