C# Class SharpTox.Core.ToxId

Represents a Tox ID (38 bytes long)
Exibir arquivo Open project: hexafluoride/Detox Class Usage Examples

Private Properties

Property Type Description
CalcChecksum ushort
ToxId System
ToxId System

Public Methods

Method Description
Equals ( object obj ) : bool
GetHashCode ( ) : int
IsValid ( byte id ) : bool

Checks whether or not the given Tox ID is valid.

IsValid ( string id ) : bool

Checks whether or not the given Tox ID is valid.

ToString ( ) : string
ToxId ( byte id ) : System

Initializes a new instance of the ToxId class.

ToxId ( string id ) : System

Initializes a new instance of the ToxId class.

operator ( ) : bool

Private Methods

Method Description
CalcChecksum ( byte address, int length ) : ushort
ToxId ( byte publicKey, uint nospam ) : System
ToxId ( string publicKey, uint nospam ) : System

Method Details

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

IsValid() public static method

Checks whether or not the given Tox ID is valid.
public static IsValid ( byte id ) : bool
id byte A byte array with a length of ToxConstant.AddressSize, containing a Tox ID.
return bool

IsValid() public static method

Checks whether or not the given Tox ID is valid.
public static IsValid ( string id ) : bool
id string A (ToxConstant.AddressSize * 2) character long hexadecimal string, containing a Tox ID.
return bool

ToString() public method

public ToString ( ) : string
return string

ToxId() public method

Initializes a new instance of the ToxId class.
public ToxId ( byte id ) : System
id byte A byte array with a length of ToxConstant.AddressSize, containing a Tox ID.
return System

ToxId() public method

Initializes a new instance of the ToxId class.
public ToxId ( string id ) : System
id string A (ToxConstant.AddressSize * 2) character long hexadecimal string, containing a Tox ID.
return System

operator() public static method

public static operator ( ) : bool
return bool