Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/laserpants/hashids-haskell

:zap: Haskell port of the Hashids library. :zap:
https://github.com/laserpants/hashids-haskell

hashids haskell

Last synced: 9 days ago
JSON representation

:zap: Haskell port of the Hashids library. :zap:

Awesome Lists containing this project

README

        

# ![hashids-haskell](http://hashids.org/public/img/hashids-logo-normal.png "Hashids")
[![License: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Language](https://img.shields.io/badge/language-Haskell-orange.svg)](https://www.haskell.org/) [![Hackage](https://img.shields.io/hackage/v/hashids.svg)](http://hackage.haskell.org/package/hashids) [![Version](https://img.shields.io/badge/hashids--version-1.0-blue.svg?colorB=ff69b4)](http://hashids.org/)
[![Haskell CI](https://github.com/laserpants/hashids-haskell/actions/workflows/haskell.yml/badge.svg)](https://github.com/laserpants/hashids-haskell/actions/workflows/haskell.yml)

Haskell port of the Hashids library. http://hashids.org

* Hackage: http://hackage.haskell.org/package/hashids
* Stackage: https://www.stackage.org/package/hashids
* Docs: http://hackage.haskell.org/package/hashids/docs/Web-Hashids.html

##### Install:

```
cabal install hashids
```

or using [Stack](https://www.haskellstack.org/):

```
stack install hashids
```

##### Hello, World:

```
{-# LANGUAGE OverloadedStrings #-}
module Main where

import Web.Hashids

main :: IO ()
main = do
let hashids = hashidsSimple "this is my salt"
ids = encodeList hashids [1, 2, 3]
numbers = decode hashids ids

print (ids, numbers)
```