Instances

Default configured Hashids instances can be created by using the Hashids.Builder default instance

Hashids hashids = new Hashids.Builder().build();

or the default constructor

Hashids hashids = new Hashids();

Configuration

The Hashids.Builder instance provides methods to configure the algorithm features like the entropy salt, the minimum hash length and the customizable alphabet.

Default Values

Below are the default values of the instance configurations which can also be found in the JavaDoc.

  • Hashids.Builder#salt(String) - By default the value of the salt is empty which will generate hashes without entropy
  • Hashids.Builder#minLength(int) By default the minimum hash length is 0 which will generate hashes with the required length only depending on the given number(s)
  • Hashids.Builder#alphabet(String) - The default alphabet is abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 which is defined in the Hashids#DEFAULT_ALPHABET constant

Features

IceCore Hashids includes opt-in instance features to enable language specific advantages like

All public API instance features are represented by the HashidsFeature class located in the com.arcticicestudio.icecore.hashids package.

results matching ""

    No results matching ""