(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 consistent-shuffle [alphabet salt] (if (= "" salt) alphabet (let [alph-bytes (apply array (string/bytes alphabet)) salt-bytes (string/bytes salt)] (var p 0) (loop [i :down [(- (length alph-bytes) 1) 0]] (let [v (mod (- (length alph-bytes) i 1) (length salt-bytes)) n (get salt-bytes v)] (set p (+ p n)) (def j (mod (+ n v p) i)) (def a (get alph-bytes j)) (def b (get alph-bytes i)) (put alph-bytes i a) (put alph-bytes j b) )) (apply string/from-bytes alph-bytes)))) (defn encode [opts num] "j0gW")