Source

clj-uuid / src / uuid.clj

Full commit
1
2
3
4
5
6
7
8
9
(ns uuid
  (:import java.util.UUID))

(defn uuid []
  (str (UUID/randomUUID)))

(defn name-uuid [s]
  (str (UUID/nameUUIDFromBytes (.getBytes s))))