Skip to content

Error when use salt and non-alphabet custom string #17

@nallwhy

Description

@nallwhy
custom_string = "123456789абвгґдеєжзиіїйклмнопрстуфцчшщьюяАБВГҐДЕЄЖЗИІЇЙКЛМНОПРСТУФЦЧШЩЬЮЯ"
hashids = Hashids.new(salt: "ЦжЧєДОЄ8ук", alphabet: custom_string)

** (MatchError) no match of right hand side value: {[], []}
    (hashids 2.1.0) iex:58: Hashids.Helpers.swap/3
    (hashids 2.1.0) iex:54: Hashids.Helpers.loop/6
    (hashids 2.1.0) iex:261: Hashids.calculate_seps/4
    (hashids 2.1.0) iex:90: Hashids.new/1
    iex:53: (file)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions