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 entropyHashids.Builder#minLength(int)By default the minimum hash length is0which will generate hashes with the required length only depending on the given number(s)Hashids.Builder#alphabet(String)- The default alphabet isabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890which is defined in theHashids#DEFAULT_ALPHABETconstant
Features
IceCore Hashids includes opt-in instance features to enable language specific advantages like
- exception handling
- disabling algorithm reference implementation interoperability limitations like the maximum number size
- allowing to prefix hexadecimal numbers with
0xor0X
All public API instance features are represented by the HashidsFeature class located in the com.arcticicestudio.icecore.hashids package.