hscuid: Collision-resistant IDs

[ bsd3, library, program, web ] [ Propose Tags ]

See README (link below).

[Skip to Readme]




Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS] 1.0.0, 1.1.0,,
Dependencies base (>=4.6 && <5), criterion (>=1.1), hostname (>=1.0), hscuid, mwc-random (>=0.13), random (>=1.0), text (>=1.2), time (>=1.4), transformers (>=0.4), unix (>=2.6), Win32 (>=2.3) [details]
License BSD-3-Clause
Author Daniel Buckmaster
Maintainer dan.buckmaster@gmail.com
Category Web
Home page https://github.com/crabmusket/hscuid
Source repo head: git clone git://github.com/crabmusket/hscuid.git
Uploaded by DanielBuckmaster at 2017-04-28T01:16:34Z
Executables perf-test
Downloads 3297 total (7 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-04-28 [all 1 reports]

Readme for hscuid-

[back to package description]


Build Status Hackage

A Haskell port of the JavaScript library for collision-resistant identifiers. To install, cabal install hscuid.

What is a CUID?

CUIDs are short random strings designed so that you can generate a lot of them over many different machines and not get collisions. They are intended to be usable in situations from HTML element IDs to database keys. You can read more about them at usecuid.org.

How do I use this library?

>>> import Web.Cuid (newCuid, newSlug)
>>> newCuid
>>> newSlug


I am currently developing with stack. To install dependencies and compile the library and test suites:

stack build

To run the collision test suite (which generates 1.2M IDs and makes sure they're all unique):

stack test

To test performance with criterion:

stack exec perf-test -- --regress allocated:iters +RTS -T