Table of Contents

Class SilverbackCryptoStreamFactory

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

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

public class SilverbackCryptoStreamFactory : ISilverbackCryptoStreamFactory
Inheritance
SilverbackCryptoStreamFactory
Implements
Inherited Members

Constructors

SilverbackCryptoStreamFactory()

public SilverbackCryptoStreamFactory()

Methods

GetDecryptStream(Stream, IDecryptionSettings, string?)

Gets a SilverbackCryptoStream compatible with the specified settings.

public 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.

public 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.