{"id":17964821,"url":"https://github.com/snaiper80/hashids-erlang","last_synced_at":"2025-03-25T06:31:04.281Z","repository":{"id":29378886,"uuid":"32913753","full_name":"snaiper80/hashids-erlang","owner":"snaiper80","description":"The Erlang port of Hashid to generate YouTube-like hashids from one or many numbers. ","archived":false,"fork":false,"pushed_at":"2017-01-02T02:23:56.000Z","size":1087,"stargazers_count":19,"open_issues_count":0,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-19T09:40:41.708Z","etag":null,"topics":["erlang","hashid"],"latest_commit_sha":null,"homepage":"http://hashids.org/erlang","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snaiper80.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-26T07:35:45.000Z","updated_at":"2024-06-28T23:46:02.000Z","dependencies_parsed_at":"2022-08-30T03:41:16.851Z","dependency_job_id":null,"html_url":"https://github.com/snaiper80/hashids-erlang","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snaiper80%2Fhashids-erlang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snaiper80%2Fhashids-erlang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snaiper80%2Fhashids-erlang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snaiper80%2Fhashids-erlang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snaiper80","download_url":"https://codeload.github.com/snaiper80/hashids-erlang/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245413634,"owners_count":20611350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["erlang","hashid"],"created_at":"2024-10-29T12:08:53.363Z","updated_at":"2025-03-25T06:31:03.984Z","avatar_url":"https://github.com/snaiper80.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![hashids](https://avatars1.githubusercontent.com/u/8481000?v=3\u0026s=200 \"Hashids\")\n\nHashids\n=======\n[![Build status](https://travis-ci.org/snaiper80/hashids-erlang.svg \"Build status\")](https://travis-ci.org/snaiper80/hashids-erlang)\n\nThe [Erlang][1] port of [Hashids][2] from JavaScript.\n\n  [1]: http://www.erlang.org/\n  [2]: http://www.hashids.org/\n\n\n## Installation\n\nAdd Hashids as a dependency to rebar.config\n```erlang\n{deps,\n    [\n        {hashids, \".*\",  {git, \"git://github.com/snaiper80/hashids-erlang.git\",  {tag, \"1.0.5\"}}}\n    ]\n}.\n```\n\n## Usage\n\nHashids encodes a integer or a list of integers.\n\n```erlang\n1\u003e hashids:new().   % create a new hashids context with default options\n{hashids_context,\"this is my salt\",8,\n                 \"5N6y2rljDQak4xgzn8ZR1oKYLmJpEbVq3OBv9WwXPMe7\",\n                 \"UHuhtcITCsFifS\",\"AdG0\"}\n\n2\u003e hashids:new([]). % same as new/0\n{hashids_context,\"this is my salt\",8,\n                 \"5N6y2rljDQak4xgzn8ZR1oKYLmJpEbVq3OBv9WwXPMe7\",\n                 \"UHuhtcITCsFifS\",\"AdG0\"}\n\n3\u003e Ctx = hashids:new([{salt, \"this is my salt\"}, {min_hash_length, 8}]).\n{hashids_context,\"this is my salt\",8,\n                 \"5N6y2rljDQak4xgzn8ZR1oKYLmJpEbVq3OBv9WwXPMe7\",\n                 \"UHuhtcITCsFifS\",\"AdG0\"}\n\n4\u003e Encoded = hashids:encode(Ctx, 12345).\n\"B0NkK9A5\"\n\n5\u003e Encoded2 = hashids:encode(Ctx, [12345, 6789]).\n\"Y9awcOLv\"\n```\n\ndecode/2 returns a list of numbers\n\n```erlang\n6\u003e hashids:decode(Ctx, Encoded).\n[12345]\n\n7\u003e hashids:decode(Ctx, Encoded2).\n[12345,6789]\n```\n\nYou can use customized characters (least 16 characters long)\n\n```erlang\nCtx = hashids:new([{salt, \"this is my salt\"},\n                   {min_hash_length, 8}, {default_alphabet, \"ABCDEFGhijklmn34567890-:\"}]).\n```\n\n## License\n\nThis software is licensed under [the MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnaiper80%2Fhashids-erlang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnaiper80%2Fhashids-erlang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnaiper80%2Fhashids-erlang/lists"}