Barotrauma Client Doc
Barotrauma.Md5Hash Class Reference

Public Types

enum class  StringHashOptions { BytePerfect = 0 , IgnoreCase = 0x1 , IgnoreWhitespace = 0x2 }
 

Public Member Functions

override string ToString ()
 
override bool Equals (object? obj)
 
override int GetHashCode ()
 

Static Public Member Functions

static string GetShortHash (string fullHash)
 
static Md5Hash StringAsHash (string hash)
 
static Md5Hash MergeHashes (IEnumerable< Md5Hash > hashes)
 
static Md5Hash CalculateForBytes (byte[] bytes)
 
static Md5Hash BytesAsHash (byte[] bytes)
 
static Md5Hash CalculateForFile (string path, StringHashOptions options)
 
static Md5Hash CalculateForString (string str, StringHashOptions options)
 
static bool operator== (Md5Hash? a, Md5Hash? b)
 
static bool operator!= (Md5Hash? a, Md5Hash? b)
 

Public Attributes

readonly byte[] ByteRepresentation
 
readonly string StringRepresentation
 
readonly string ShortRepresentation
 

Static Public Attributes

static readonly Md5Hash Blank = new Md5Hash(new string('0', 32))
 

Detailed Description

Definition at line 12 of file Md5Hash.cs.

Member Enumeration Documentation

◆ StringHashOptions

Enumerator
BytePerfect 
IgnoreCase 
IgnoreWhitespace 

Definition at line 123 of file Md5Hash.cs.

Member Function Documentation

◆ BytesAsHash()

static Md5Hash Barotrauma.Md5Hash.BytesAsHash ( byte[]  bytes)
static

Definition at line 117 of file Md5Hash.cs.

◆ CalculateForBytes()

static Md5Hash Barotrauma.Md5Hash.CalculateForBytes ( byte[]  bytes)
static

Definition at line 112 of file Md5Hash.cs.

◆ CalculateForFile()

static Md5Hash Barotrauma.Md5Hash.CalculateForFile ( string  path,
StringHashOptions  options 
)
static

Definition at line 130 of file Md5Hash.cs.

◆ CalculateForString()

static Md5Hash Barotrauma.Md5Hash.CalculateForString ( string  str,
StringHashOptions  options 
)
static

Definition at line 144 of file Md5Hash.cs.

◆ Equals()

override bool Barotrauma.Md5Hash.Equals ( object?  obj)

Definition at line 163 of file Md5Hash.cs.

◆ GetHashCode()

override int Barotrauma.Md5Hash.GetHashCode ( )

Definition at line 178 of file Md5Hash.cs.

◆ GetShortHash()

static string Barotrauma.Md5Hash.GetShortHash ( string  fullHash)
static

Definition at line 68 of file Md5Hash.cs.

◆ MergeHashes()

static Md5Hash Barotrauma.Md5Hash.MergeHashes ( IEnumerable< Md5Hash hashes)
static

Definition at line 102 of file Md5Hash.cs.

◆ operator!=()

static bool Barotrauma.Md5Hash.operator!= ( Md5Hash a,
Md5Hash b 
)
static

◆ operator==()

static bool Barotrauma.Md5Hash.operator== ( Md5Hash a,
Md5Hash b 
)
static

◆ StringAsHash()

static Md5Hash Barotrauma.Md5Hash.StringAsHash ( string  hash)
static

Definition at line 96 of file Md5Hash.cs.

◆ ToString()

override string Barotrauma.Md5Hash.ToString ( )

Definition at line 158 of file Md5Hash.cs.

Member Data Documentation

◆ Blank

readonly Md5Hash Barotrauma.Md5Hash.Blank = new Md5Hash(new string('0', 32))
static

Definition at line 14 of file Md5Hash.cs.

◆ ByteRepresentation

readonly byte [] Barotrauma.Md5Hash.ByteRepresentation

Definition at line 31 of file Md5Hash.cs.

◆ ShortRepresentation

readonly string Barotrauma.Md5Hash.ShortRepresentation

Definition at line 33 of file Md5Hash.cs.

◆ StringRepresentation

readonly string Barotrauma.Md5Hash.StringRepresentation

Definition at line 32 of file Md5Hash.cs.