Skip to content

Commit

Permalink
updated: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danlentz committed Mar 10, 2015
1 parent ea5ebfb commit 853c5ca
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ clj-uuid

[![Build Status](https://travis-ci.org/danlentz/clj-uuid.svg?branch=master)]
(https://travis-ci.org/danlentz/clj-uuid)
[![Dependency Status](https://www.versioneye.com/clojure/danlentz:clj-uuid/0.1.2-SNAPSHOT/badge.svg)](https://www.versioneye.com/clojure/danlentz:clj-uuid/0.1.2-SNAPSHOT)
[![Dependency Status](https://www.versioneye.com/clojure/danlentz:clj-uuid/0.1.3-SNAPSHOT/badge.svg)](https://www.versioneye.com/clojure/danlentz:clj-uuid/0.1.3-SNAPSHOT)


**clj-uuid** is a Clojure library for generation and utilization of
Expand Down Expand Up @@ -416,8 +416,8 @@ used in the graph-object database system

### A Simple Example

Ok, so now you know how to use this nifty new UUID library and your are
burning up to do somthing awesome with UUID's... But, ah, hmmm... First
Ok, so now you know how to use this nifty new UUID library and you are
burning up to do something awesome with UUID's... But, ah, hmmm... First
you need to figure out what exactly you want to do with them. Well,
before you start working on your distributed cloud-based secret
weapon, here is a simple way you can generate cryptographically
Expand Down
8 changes: 5 additions & 3 deletions src/clj_uuid.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
[clock :as clock]
[node :as node]])
(:import [java.security MessageDigest]
[java.io ByteArrayOutputStream ObjectOutputStream]
[java.net URI URL]
[java.util UUID]))
[java.io ByteArrayOutputStream
ObjectOutputStream]
[java.net URI
URL]
[java.util UUID]))

(set! *warn-on-reflection* true)

Expand Down
10 changes: 7 additions & 3 deletions src/clj_uuid/node.clj
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(def ^:private datasources ["java.vendor"
"java.vendor.url"
"java.version"
"os.arch"
"os.name"
"os.version"])

(defn- all-local-addresses []
(let [^InetAddress local-host (InetAddress/getLocalHost)
Expand All @@ -110,9 +116,7 @@
^Properties props (System/getProperties)
to-digest (reduce (fn [acc key]
(conj acc (.getProperty props key)))
addresses ["java.vendor" "java.vendor.url"
"java.version" "os.arch"
"os.name" "os.version"])]
addresses datasources)]
(doseq [^String d to-digest]
(compile-if (java6?)
(.update digest (.getBytes d))
Expand Down

0 comments on commit 853c5ca

Please sign in to comment.