~statianzo/janet-hashids

2f3b768a4eaeed564f948995f52ef0615bf92c42 — Jason Staten 4 years ago 7054cec master
rearrange args
1 files changed, 3 insertions(+), 3 deletions(-)

M hashids.janet
M hashids.janet => hashids.janet +3 -3
@@ 39,7 39,7 @@
(defn- intersection [s1 s2]
  (seq [x :in s1 y :in s2 :when (= x y)] x))

(defn balance [sep-bytes alph-bytes] 
(defn balance [alph-bytes seps-bytes] 

[



@@ 70,8 70,8 @@
      seps-bytes (string/bytes seps)
      alph-unbal (difference alph-bytes seps-bytes)
      seps-unbal (intersection alph-bytes seps-bytes)
      [seps-bal alph-bal] (balance (consistent-shuffle seps-unbal salt-bytes)
                                    alph-unbal)]
      [seps-bal alph-bal] (balance alph-unbal
                                   (consistent-shuffle seps-unbal salt-bytes))]
{
:seps (apply string/from-bytes seps-unbal)
:alph (apply string/from-bytes alph-unbal)