|
|
@ -39,7 +39,7 @@
|
|
|
|
(defn- intersection [s1 s2]
|
|
|
|
(defn- intersection [s1 s2]
|
|
|
|
(seq [x :in s1 y :in s2 :when (= x y)] x))
|
|
|
|
(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)
|
|
|
|
seps-bytes (string/bytes seps)
|
|
|
|
alph-unbal (difference alph-bytes seps-bytes)
|
|
|
|
alph-unbal (difference alph-bytes seps-bytes)
|
|
|
|
seps-unbal (intersection alph-bytes seps-bytes)
|
|
|
|
seps-unbal (intersection alph-bytes seps-bytes)
|
|
|
|
[seps-bal alph-bal] (balance (consistent-shuffle seps-unbal salt-bytes)
|
|
|
|
[seps-bal alph-bal] (balance alph-unbal
|
|
|
|
alph-unbal)]
|
|
|
|
(consistent-shuffle seps-unbal salt-bytes))]
|
|
|
|
{
|
|
|
|
{
|
|
|
|
:seps (apply string/from-bytes seps-unbal)
|
|
|
|
:seps (apply string/from-bytes seps-unbal)
|
|
|
|
:alph (apply string/from-bytes alph-unbal)
|
|
|
|
:alph (apply string/from-bytes alph-unbal)
|
|
|
|