Last active
February 26, 2025 19:45
-
-
Save kubek2k/8446062 to your computer and use it in GitHub Desktop.
Revisions
-
kubek2k revised this gist
Aug 27, 2019 . 1 changed file with 2 additions and 6 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,3 @@ (defn sha256 [string] (let [digest (.digest (MessageDigest/getInstance "SHA-256") (.getBytes string "UTF-8"))] (apply str (map (partial format "%02x") digest)))) -
kubek2k renamed this gist
Jan 15, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ (defn sha256 [string] (let [md (java.security.MessageDigest/getInstance "SHA-256") byt (. string getBytes) -
kubek2k renamed this gist
Jan 15, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
kubek2k created this gist
Jan 15, 2014 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ (defn- sha256 [string] (let [md (java.security.MessageDigest/getInstance "SHA-256") byt (. string getBytes) digest (. md digest byt)] (clojure.string/join (map (fn [_] (Integer/toHexString (bit-and _ 0xFF))) digest))) )