Class SymmetricEncryptionSettingsBase
The base class for symmetric encryption settings used to encrypt or decrypt the messages being sent through the message broker.
Inheritance
Inherited Members
Namespace: Silverback.Messaging.Encryption
Assembly: Silverback.Integration.dll
Syntax
public abstract record SymmetricEncryptionSettingsBase : IValidatableSettings, IEquatable<SymmetricEncryptionSettingsBase>
Constructors
SymmetricEncryptionSettingsBase()
The base class for symmetric encryption settings used to encrypt or decrypt the messages being sent through the message broker.
Declaration
protected SymmetricEncryptionSettingsBase()
SymmetricEncryptionSettingsBase(SymmetricEncryptionSettingsBase)
The base class for symmetric encryption settings used to encrypt or decrypt the messages being sent through the message broker.
Declaration
protected SymmetricEncryptionSettingsBase(SymmetricEncryptionSettingsBase original)
Parameters
| Type | Name | Description |
|---|---|---|
| SymmetricEncryptionSettingsBase | original |
Properties
AlgorithmName
Gets the name of the specific implementation of the SymmetricAlgorithm class to use to encrypt or decrypt the messages.
Declaration
public string AlgorithmName { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
BlockSize
Gets the block size, in bits, of the cryptographic operation.
If null, the default value for the specified algorithm will be used.
Declaration
public int? BlockSize { get; init; }
Property Value
| Type | Description |
|---|---|
| int? |
CipherMode
Gets the mode for operation of the symmetric algorithm.
If null, the default value for the specified algorithm will be used.
Declaration
public CipherMode? CipherMode { get; init; }
Property Value
| Type | Description |
|---|---|
| CipherMode? |
EqualityContract
The base class for symmetric encryption settings used to encrypt or decrypt the messages being sent through the message broker.
Declaration
protected virtual Type EqualityContract { get; }
Property Value
| Type | Description |
|---|---|
| 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.
Declaration
public int? FeedbackSize { get; init; }
Property Value
| Type | Description |
|---|---|
| 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.
Declaration
public byte[]? InitializationVector { get; init; }
Property Value
| Type | Description |
|---|---|
| byte[] |
Key
Gets the secret key for the symmetric algorithm.
Declaration
public byte[]? Key { get; init; }
Property Value
| Type | Description |
|---|---|
| byte[] |
PaddingMode
Gets the padding mode used in the symmetric algorithm.
If null, the default value for the specified algorithm will be used.
Declaration
public PaddingMode? PaddingMode { get; init; }
Property Value
| Type | Description |
|---|---|
| PaddingMode? |
Methods
Equals(SymmetricEncryptionSettingsBase?)
The base class for symmetric encryption settings used to encrypt or decrypt the messages being sent through the message broker.
Declaration
public virtual bool Equals(SymmetricEncryptionSettingsBase? other)
Parameters
| Type | Name | Description |
|---|---|---|
| SymmetricEncryptionSettingsBase | other |
Returns
| Type | Description |
|---|---|
| bool |
Equals(object?)
The base class for symmetric encryption settings used to encrypt or decrypt the messages being sent through the message broker.
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
GetHashCode()
The base class for symmetric encryption settings used to encrypt or decrypt the messages being sent through the message broker.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Overrides
PrintMembers(StringBuilder)
The base class for symmetric encryption settings used to encrypt or decrypt the messages being sent through the message broker.
Declaration
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| StringBuilder | builder |
Returns
| Type | Description |
|---|---|
| bool |
ToString()
The base class for symmetric encryption settings used to encrypt or decrypt the messages being sent through the message broker.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
Overrides
Validate()
Throws a SilverbackConfigurationException if the configuration is not valid.
Declaration
public virtual void Validate()
Operators
operator ==(SymmetricEncryptionSettingsBase?, SymmetricEncryptionSettingsBase?)
The base class for symmetric encryption settings used to encrypt or decrypt the messages being sent through the message broker.
Declaration
public static bool operator ==(SymmetricEncryptionSettingsBase? left, SymmetricEncryptionSettingsBase? right)
Parameters
| Type | Name | Description |
|---|---|---|
| SymmetricEncryptionSettingsBase | left | |
| SymmetricEncryptionSettingsBase | right |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(SymmetricEncryptionSettingsBase?, SymmetricEncryptionSettingsBase?)
The base class for symmetric encryption settings used to encrypt or decrypt the messages being sent through the message broker.
Declaration
public static bool operator !=(SymmetricEncryptionSettingsBase? left, SymmetricEncryptionSettingsBase? right)
Parameters
| Type | Name | Description |
|---|---|---|
| SymmetricEncryptionSettingsBase | left | |
| SymmetricEncryptionSettingsBase | right |
Returns
| Type | Description |
|---|---|
| bool |