class Hasher

Methods

static int
quickHash(string $text)

Generate a hash that matches the hashing algorithm used in render.js

static array
charsToCodepointsWithSurrogates(array $chars)

Convert a list of UTF-8 characters into a list of Unicode codepoint with surrogates

static int
cp(string $char)

Compute and return the Unicode codepoint for given UTF-8 char

Details

at line 22
static int quickHash(string $text)

Generate a hash that matches the hashing algorithm used in render.js

See hash() in render.js

Parameters

string $text

Return Value

int

at line 56
static protected array charsToCodepointsWithSurrogates(array $chars)

Convert a list of UTF-8 characters into a list of Unicode codepoint with surrogates

Parameters

array $chars

Return Value

array

at line 82
static protected int cp(string $char)

Compute and return the Unicode codepoint for given UTF-8 char

Parameters

string $char

UTF-8 char

Return Value

int