Table of Contents

Class TypeHasher

Namespace
BSGameLib.Networking
Assembly
BSGameLib.Networking.dll

Names packet types on the wire by a hash of their names.

public static class TypeHasher
Inheritance
TypeHasher
Inherited Members

Methods

GetTypeHash(Type)

Returns the SHA1 of the type's name as 40 hex characters. The namespace is not hashed, so two types with the same name have the same hash.

[SuppressMessage("Security", "CA5350", Justification = "Names a packet type on the wire, not a secret; another algorithm would change every packet's id.")]
public static string GetTypeHash(Type type)

Parameters

type Type

Returns

string