(def DEFAULT_ALPHABET "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890") (def DEFAULT_SEPS "cfhistuCFHISTU") (def DEFAULT_SALT "") (def DEFAULT_MIN_LENGTH 0) (def MIN_ALPHABET_LENGTH 16) (def SEP_DIV (/ 7 2)) (def GUARD_DIV 12) (defn- swap [arr i j] (def a (get arr j)) (def b (get arr i)) (put arr i a) (put arr j b) ) (defn consistent-shuffle [alphabet salt] (if (= "" salt) alphabet (let [alph-bytes (apply array (string/bytes alphabet)) salt-bytes (string/bytes salt) max-index (- (length alph-bytes) 1)] (var p 0) (loop [i :down [max-index 0]] (let [v (mod (- max-index i) (length salt-bytes)) n (get salt-bytes v) j (mod (+ n v (set p (+ p n))) i)] (swap alph-bytes i j))) (apply string/from-bytes alph-bytes)))) (defn encode [opts num] "j0gW")