Table of Contents

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

Major int

The major version number.

Minor int

The minor version number.

Fields

Unknown

Unknown or undetectable version.

public static readonly EncryptionVersion Unknown

Field Value

EncryptionVersion

Version10

Version 1.0 - Initial AES-256-GCM format.

public static readonly EncryptionVersion Version10

Field Value

EncryptionVersion

Version11

Version 1.1 - Enhanced metadata and key versioning.

public static readonly EncryptionVersion Version11

Field Value

EncryptionVersion

Properties

Major

The major version number.

public int Major { get; init; }

Property Value

int

Minor

The minor version number.

public int Minor { get; init; }

Property Value

int

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

other EncryptionVersion

An 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 other in the sort order.
Zero This instance occurs in the same position in the sort order as other.
Greater than zero This instance follows other in the sort order.

Parse(string)

Parses a version string into an EncryptionVersion.

public static EncryptionVersion Parse(string version)

Parameters

version string

The 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

left EncryptionVersion
right EncryptionVersion

Returns

bool

operator >=(EncryptionVersion, EncryptionVersion)

Determines if this version is greater than or equal to another version.

public static bool operator >=(EncryptionVersion left, EncryptionVersion right)

Parameters

left EncryptionVersion
right EncryptionVersion

Returns

bool

operator <(EncryptionVersion, EncryptionVersion)

Determines if this version is less than another version.

public static bool operator <(EncryptionVersion left, EncryptionVersion right)

Parameters

left EncryptionVersion
right EncryptionVersion

Returns

bool

operator <=(EncryptionVersion, EncryptionVersion)

Determines if this version is less than or equal to another version.

public static bool operator <=(EncryptionVersion left, EncryptionVersion right)

Parameters

left EncryptionVersion
right EncryptionVersion

Returns

bool