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
originalSymmetricEncryptionSettingsBase
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
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
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
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
Methods
Equals(SymmetricEncryptionSettingsBase?)
public virtual bool Equals(SymmetricEncryptionSettingsBase? other)
Parameters
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
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
Returns
operator !=(SymmetricEncryptionSettingsBase?, SymmetricEncryptionSettingsBase?)
public static bool operator !=(SymmetricEncryptionSettingsBase? left, SymmetricEncryptionSettingsBase? right)