Struct EncryptionVersion
- Namespace
- Excalibur.Compliance
- Assembly
- Excalibur.Compliance.Abstractions.dll
Represents an encryption format version.
public readonly record struct EncryptionVersion : IComparable<EncryptionVersion>, IEquatable<EncryptionVersion>
- Implements
- Inherited Members
Constructors
EncryptionVersion(int, int)
Represents an encryption format version.
public EncryptionVersion(int Major, int Minor)
Parameters
Fields
Unknown
Unknown or undetectable version.
public static readonly EncryptionVersion Unknown
Field Value
Version10
Version 1.0 - Initial AES-256-GCM format.
public static readonly EncryptionVersion Version10
Field Value
Version11
Version 1.1 - Enhanced metadata and key versioning.
public static readonly EncryptionVersion Version11
Field Value
Properties
Major
The major version number.
public int Major { get; init; }
Property Value
Minor
The minor version number.
public int Minor { get; init; }
Property Value
Methods
CompareTo(EncryptionVersion)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public int CompareTo(EncryptionVersion other)
Parameters
otherEncryptionVersionAn object to compare with this instance.
Returns
- int
A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value Meaning Less than zero This instance precedes otherin the sort order.Zero This instance occurs in the same position in the sort order as other.Greater than zero This instance follows otherin the sort order.
Parse(string)
Parses a version string into an EncryptionVersion.
public static EncryptionVersion Parse(string version)
Parameters
versionstringThe version string (e.g., "v1.0" or "1.0").
Returns
- EncryptionVersion
The parsed encryption version.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator >(EncryptionVersion, EncryptionVersion)
Determines if this version is greater than another version.
public static bool operator >(EncryptionVersion left, EncryptionVersion right)
Parameters
leftEncryptionVersionrightEncryptionVersion
Returns
operator >=(EncryptionVersion, EncryptionVersion)
Determines if this version is greater than or equal to another version.
public static bool operator >=(EncryptionVersion left, EncryptionVersion right)
Parameters
leftEncryptionVersionrightEncryptionVersion
Returns
operator <(EncryptionVersion, EncryptionVersion)
Determines if this version is less than another version.
public static bool operator <(EncryptionVersion left, EncryptionVersion right)
Parameters
leftEncryptionVersionrightEncryptionVersion
Returns
operator <=(EncryptionVersion, EncryptionVersion)
Determines if this version is less than or equal to another version.
public static bool operator <=(EncryptionVersion left, EncryptionVersion right)
Parameters
leftEncryptionVersionrightEncryptionVersion