icecore-hashids

A lightweight generator for short, unique, non-sequential and decodable Hashids from non-negative numbers.

License

License

GroupId

GroupId

com.arcticicestudio
ArtifactId

ArtifactId

icecore-hashids
Last Version

Last Version

0.4.0
Release Date

Release Date

Type

Type

jar
Description

Description

icecore-hashids
A lightweight generator for short, unique, non-sequential and decodable Hashids from non-negative numbers.
Project URL

Project URL

https://github.com/arcticicestudio/icecore-hashids
Project Organization

Project Organization

Arctic Ice Studio
Source Code Management

Source Code Management

https://github.com/arcticicestudio/icecore-hashids

Download icecore-hashids

How to add to project

<!-- https://jarcasting.com/artifacts/com.arcticicestudio/icecore-hashids/ -->
<dependency>
    <groupId>com.arcticicestudio</groupId>
    <artifactId>icecore-hashids</artifactId>
    <version>0.4.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.arcticicestudio/icecore-hashids/
implementation 'com.arcticicestudio:icecore-hashids:0.4.0'
// https://jarcasting.com/artifacts/com.arcticicestudio/icecore-hashids/
implementation ("com.arcticicestudio:icecore-hashids:0.4.0")
'com.arcticicestudio:icecore-hashids:jar:0.4.0'
<dependency org="com.arcticicestudio" name="icecore-hashids" rev="0.4.0">
  <artifact name="icecore-hashids" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.arcticicestudio', module='icecore-hashids', version='0.4.0')
)
libraryDependencies += "com.arcticicestudio" % "icecore-hashids" % "0.4.0"
[com.arcticicestudio/icecore-hashids "0.4.0"]

Dependencies

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.hamcrest : hamcrest-junit jar 2.0.0.0

Project Modules

There are no modules declared in this project.


A lightweight generator for short, unique, non-sequential and decodable Hashids from non-negative numbers.

Implementation of the Hashids algorithm.

Hashids are obfuscated unique hashes of non-negative (long) integer numbers, but in contrast to cryptographic one-way hash algorithms they are can be decoded again. The algorithm can be used to either generate a hash from a single number or bundling several numbers into one to be stored as simple short UIDs. This design allows to use them for many use-cases like

  • URL shortening
  • database ID protection
  • shard numbers storage
  • invitation-, authorization- and gift codes
  • complex- or clustered system parameters

Numbers like 347 are converted into strings like yr8, or an array of numbers like [27, 986] into 3kTMd.

Features

The algorithm provides the following features:

In addition, the library provides features to

Please note that most features will break the interoperability with the algorithm reference implementation!

Getting Started

The project documentation contains chapters to learn about the installation and requirements, get an overview of the API and learn how to use it, and build the project and running the tests.

Contributing

Read the contributing guide to learn about the development process and how to propose enhancement suggestions and report bugs, how to submit pull requests and the project's styleguides, branch organization and versioning model.

The guide also includes information about minimal, complete, and verifiable examples and other ways to contribute to the project like improving existing issues and giving feedback on issues and pull requests.


Copyright © 2016-present Arctic Ice Studio

Versions

Version
0.4.0
0.3.0
0.2.0