You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
janet-hashids/test/consistent-shuffle.janet

19 lines
281 B

4 years ago
(import ../hashids :as h)
(assert
(= "abc" (h/consistent-shuffle "abc" "")))
(def salt "this is my salt")
(assert
(= "ba" (h/consistent-shuffle "ab" salt)))
(assert
(= "bca" (h/consistent-shuffle "abc" salt)))
(assert
(= "cadb" (h/consistent-shuffle "abcd" salt)))