laserpants / hashids-haskell

:zap: Haskell port of the Hashids library. :zap:
http://hashids.org/
MIT License
24 stars 10 forks source link
hashids haskell

hashids-haskell

License: MIT Language Hackage Version Haskell CI

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

Install:
cabal install hashids

or using Stack:

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)