1
0
Fork 0
mirror of https://github.com/SunRed/haste-server.git synced 2024-11-01 01:30:21 +01:00
haste-server/docs/generators.md
2020-08-29 05:29:39 +02:00

925 B

Generators

Here's a list of all supported random string generators.
One of these is meant to be set in config.json as keyGenerator object.
Default type is random with all alphanumeric characters as keyspace.

Table of Contents

Random

Generates a random key from set of characters in keysapce.
Keyspace can be left empty to use all alphanumeric characters instead.

{
	"type": "random",
	"keyspace": "abcdef"
}

Phonetic

Generates phonetic key with a combination of vovels similar to pwgen command on linux.

{
	"type": "phonetic"
}

Dictionary

Generates a key consisting of words from file named words.txt, one word per line.
To avoid any issues with URL length, it is recommended to use keyLength 5 or shorter.

{
	"type": "dictionary",
	"path": "./words.txt"
}