BcryptHashInfo Struct

Contains parsed information from a BCrypt hash string.

public readonly struct BcryptHashInfo : IEquatable<BcryptHashInfo>
Implements

Constructors

NameDescription
BcryptHashInfo(BcryptVersion, int)Initializes a new instance of the BcryptHashInfo struct.

BcryptHashInfo(BcryptVersion, int)

BcryptHashInfo.cs

Initializes a new instance of the BcryptHashInfo struct.

public BcryptHashInfo(BcryptVersion version, int workFactor)

Parameters

version BcryptVersion
The BCrypt revision.
workFactor int
The BCrypt work factor (cost).

Properties

NameDescription
VersionGets the BCrypt revision.
WorkFactorGets the BCrypt work factor (cost).

Gets the BCrypt revision.

public BcryptVersion Version { get; }

Property value

BcryptVersion

Gets the BCrypt work factor (cost).

public int WorkFactor { get; }

Property value

int

Methods

NameDescription
Equals(BcryptHashInfo)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Indicates whether this instance and a specified object are equal.
GetHashCode()Returns the hash code for this instance.

Equals overloads

Equals(BcryptHashInfo)

BcryptHashInfo.cs

Indicates whether the current object is equal to another object of the same type.

public bool Equals(BcryptHashInfo other)
Parameters
other BcryptHashInfo
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

BcryptHashInfo.cs

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current instance.
Returns

bool true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

BcryptHashInfo.cs

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int A 32-bit signed integer that is the hash code for this instance.

Operators

NameDescription
operator ==(BcryptHashInfo, BcryptHashInfo)Determines whether two hash information values are equal.
operator !=(BcryptHashInfo, BcryptHashInfo)Determines whether two hash information values are different.

operator ==(BcryptHashInfo, BcryptHashInfo)

BcryptHashInfo.cs

Determines whether two hash information values are equal.

public static bool operator ==(BcryptHashInfo left, BcryptHashInfo right)

Parameters

left BcryptHashInfo
The first value.
right BcryptHashInfo
The second value.

Returns

bool true if the values are equal; otherwise, false.

operator !=(BcryptHashInfo, BcryptHashInfo)

BcryptHashInfo.cs

Determines whether two hash information values are different.

public static bool operator !=(BcryptHashInfo left, BcryptHashInfo right)

Parameters

left BcryptHashInfo
The first value.
right BcryptHashInfo
The second value.

Returns

bool true if the values are different; otherwise, false.