Table of Contents

Struct HWID

Namespace
Uncreated.Warfare.Moderation
Assembly
Uncreated.Warfare.dll

A 20-length hardware ID of an Unturned player.

[JsonConverter(typeof(HWIDJsonConverter))]
[ValueConverter(typeof(HWIDValueConverter))]
public readonly struct HWID : IEquatable<HWID>
Implements
Inherited Members

Constructors

HWID(byte*)

public HWID(byte* ptr)

Parameters

ptr byte*

HWID(byte[], int)

public HWID(byte[] bytes, int index = 0)

Parameters

bytes byte[]
index int

HWID(long, long, int)

public HWID(long i1, long i2, int i3)

Parameters

i1 long
i2 long
i3 int

HWID(Span<byte>)

public HWID(Span<byte> span)

Parameters

span Span<byte>

Fields

Size

public const int Size = 20

Field Value

int

Zero

public static readonly HWID Zero

Field Value

HWID

Methods

AsMySQLParameter()

public object AsMySQLParameter()

Returns

object

CopyTo(byte*)

public int CopyTo(byte* ptr)

Parameters

ptr byte*

Returns

int

CopyTo(byte[], int)

public int CopyTo(byte[] array, int offset)

Parameters

array byte[]
offset int

Returns

int

CopyTo(Span<byte>)

public int CopyTo(Span<byte> span)

Parameters

span Span<byte>

Returns

int

Equals(byte[])

public bool Equals(byte[] hwid)

Parameters

hwid byte[]

Returns

bool

Equals(object?)

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.

Equals(HWID)

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

public bool Equals(HWID other)

Parameters

other HWID

An object to compare with this object.

Returns

bool

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

GenerateRandomHWID()

public static HWID GenerateRandomHWID()

Returns

HWID

GetHashCode()

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.

ReadFromByteReader(ByteReader)

public static HWID ReadFromByteReader(ByteReader reader)

Parameters

reader ByteReader

Returns

HWID

ReadFromDataReader(int, IDataReader)

public static HWID ReadFromDataReader(int ordinal, IDataReader reader)

Parameters

ordinal int
reader IDataReader

Returns

HWID

ReadFromJsonReader(ref Utf8JsonReader)

public static HWID ReadFromJsonReader(ref Utf8JsonReader reader)

Parameters

reader Utf8JsonReader

Returns

HWID

ToBase10String()

public string ToBase10String()

Returns

string

ToBase16String(bool, bool)

public string ToBase16String(bool lowerCase = false, bool includePrefix = false)

Parameters

lowerCase bool
includePrefix bool

Returns

string

ToBase64String()

public string ToBase64String()

Returns

string

ToByteArray()

public byte[] ToByteArray()

Returns

byte[]

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

TryParseBase10(string, out HWID)

public static bool TryParseBase10(string str, out HWID hwid)

Parameters

str string
hwid HWID

Returns

bool

TryParseBase16(string, out HWID)

public static bool TryParseBase16(string str, out HWID hwid)

Parameters

str string
hwid HWID

Returns

bool

TryParseBase64(string, out HWID)

public static bool TryParseBase64(string str, out HWID hwid)

Parameters

str string
hwid HWID

Returns

bool

WriteToByteWriter(ByteWriter)

public void WriteToByteWriter(ByteWriter writer)

Parameters

writer ByteWriter

WriteToJsonWriter(Utf8JsonWriter)

public void WriteToJsonWriter(Utf8JsonWriter writer)

Parameters

writer Utf8JsonWriter

Operators

operator ==(HWID, HWID)

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

Parameters

left HWID
right HWID

Returns

bool

operator !=(HWID, HWID)

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

Parameters

left HWID
right HWID

Returns

bool