Skip to main content

BackendUtils

A static class in TavernLib, TavernLib.Backend.

Small helpers shared by TavernLib's backend: the listing URL, SHA-256 hashing and random URL-safe tokens.

Properties​

MemberWhat it is
static string ServerUri { get; }/servers, the listing API's path for posting and removing a server.
static string TavernApi { get; }The Community Servers listing's base URL: /listing_api's value, or http://themoddingtavern.com:1763.

Methods​

MemberWhat it is
static string HashDigest(string input)The SHA-256 hash of a string's UTF-8 bytes, as lower-case hex.
static string TokenUrlSafe(int nbytes = 32)A random token from a cryptographic generator, as base64url with no padding. 32 bytes by default.