Table of Contents

Class SymmetricEncryptionSettingsBase

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

The base class for symmetric encryption settings used to encrypt or decrypt the messages being sent through the message broker.

public abstract record SymmetricEncryptionSettingsBase : IValidatableSettings, IEquatable<SymmetricEncryptionSettingsBase>
Inheritance
SymmetricEncryptionSettingsBase
Implements
Derived
Inherited Members

Constructors

SymmetricEncryptionSettingsBase()

protected SymmetricEncryptionSettingsBase()

SymmetricEncryptionSettingsBase(SymmetricEncryptionSettingsBase)

protected SymmetricEncryptionSettingsBase(SymmetricEncryptionSettingsBase original)

Parameters

original SymmetricEncryptionSettingsBase

Properties

AlgorithmName

Gets the name of the specific implementation of the SymmetricAlgorithm class to use to encrypt or decrypt the messages.

public string AlgorithmName { get; init; }

Property Value

string

BlockSize

Gets the block size, in bits, of the cryptographic operation.

If null, the default value for the specified algorithm will be used.

public int? BlockSize { get; init; }

Property Value

int?

CipherMode

Gets the mode for operation of the symmetric algorithm.

If null, the default value for the specified algorithm will be used.

public CipherMode? CipherMode { get; init; }

Property Value

CipherMode?

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

FeedbackSize

Gets the feedback size, in bits, of the cryptographic operation for the Cipher Feedback (CFB) and Output Feedback (OFB) cipher modes.

If null, the default value for the specified algorithm will be used.

public int? FeedbackSize { get; init; }

Property Value

int?

InitializationVector

Gets the optional initialization vector (IV) for the symmetric algorithm.

Important: If null no fixed IV is provided and the producer will automatically generate a random one for each message that will also be prepended to the actual encrypted message to be available to the consumer.

public byte[]? InitializationVector { get; init; }

Property Value

byte[]

Key

Gets the secret key for the symmetric algorithm.

public byte[]? Key { get; init; }

Property Value

byte[]

PaddingMode

Gets the padding mode used in the symmetric algorithm.

If null, the default value for the specified algorithm will be used.

public PaddingMode? PaddingMode { get; init; }

Property Value

PaddingMode?

Methods

Equals(SymmetricEncryptionSettingsBase?)

public virtual bool Equals(SymmetricEncryptionSettingsBase? other)

Parameters

other SymmetricEncryptionSettingsBase

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Validate()

Throws a SilverbackConfigurationException if the configuration is not valid.

public virtual void Validate()

Operators

operator ==(SymmetricEncryptionSettingsBase?, SymmetricEncryptionSettingsBase?)

public static bool operator ==(SymmetricEncryptionSettingsBase? left, SymmetricEncryptionSettingsBase? right)

Parameters

left SymmetricEncryptionSettingsBase
right SymmetricEncryptionSettingsBase

Returns

bool

operator !=(SymmetricEncryptionSettingsBase?, SymmetricEncryptionSettingsBase?)

public static bool operator !=(SymmetricEncryptionSettingsBase? left, SymmetricEncryptionSettingsBase? right)

Parameters

left SymmetricEncryptionSettingsBase
right SymmetricEncryptionSettingsBase

Returns

bool