Class HashingAbstract
Methods
StatichashCode
-
Provides a solid string hashing algorithm.
Sourced from: https://stackoverflow.com/a/52171480
Parameters
- str: string
String to hash.
Optionalseed: numberA seed value altering the hash; default value:
0.
Returns number
Hash code.
- str: string
StaticisUuidv4
-
Validates that the given string is formatted as a UUIDv4 string.
Parameters
- uuid: unknown
UUID string to test.
Returns uuid is string
Is UUIDv4 string.
- uuid: unknown
Staticuuidv4
-
Generates a UUID v4 compliant ID. Please use a complete UUID generation package for guaranteed compliance.
This code is an evolution of the
Jed UUIDfrom the following Gist. https://gist.github.com/jed/982883There is a public domain / free copy license attached to it that is not a standard OSS license... https://gist.github.com/jed/982883#file-license-txt
Returns string
UUIDv4
Provides various utilities for generating hash codes for strings and UUIDs.