yomorun / hashids-java

Hashids algorithm v1.0.0 implementation in Java
http://hashids.org
MIT License
1.02k stars 156 forks source link

Is there any way to provide maximum hash length #50

Closed yogitaAP closed 6 years ago

yogitaAP commented 6 years ago

The way I can provide a minimum character length for the generated hash. Can I provide a maximum hash length as well? If no, is there any workaround.

0x3333 commented 6 years ago

You have 4 constructors:

  public Hashids() {
  }

  public Hashids(String salt) {
  }

  public Hashids(String salt, int minHashLength) {
  }

  public Hashids(String salt, int minHashLength, String alphabet) {
  }

A maximum can't be provided.