File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 33 :url " https://github.com/ring-clojure/ring-codec"
44 :license {:name " The MIT License"
55 :url " http://opensource.org/licenses/MIT" }
6- :dependencies [[org.clojure/clojure " 1.5.1" ]
7- [commons-codec " 1.15" ]]
6+ :dependencies [[org.clojure/clojure " 1.5.1" ]]
87 :plugins [[lein-codox " 0.10.7" ]]
98 :codox
109 {:output-path " codox"
Original file line number Diff line number Diff line change 11(ns ring.util.codec
22 " Functions for encoding and decoding data."
33 (:require [clojure.string :as str])
4- (:import java.io.File
5- java.util.Map
4+ (:import java.util.Map
65 [java.net URLEncoder URLDecoder]
7- org.apache.commons.codec.binary. Base64))
6+ [java.util Base64] ))
87
98(defn assoc-conj
109 " Associate a key with a value in a map. If the key already exists in the map,
7978(defn base64-encode
8079 " Encode an array of bytes into a base64 encoded string."
8180 [unencoded]
82- (String. (Base64/encodeBase64 unencoded)))
81+ (String. (.encode ( Base64/getEncoder ) unencoded)))
8382
8483(defn base64-decode
8584 " Decode a base64 encoded string into an array of bytes."
8685 [^String encoded]
87- (Base64/decodeBase64 ( .getBytes encoded) ))
86+ (.decode ( Base64/getDecoder ) encoded))
8887
8988(defprotocol ^:no-doc FormEncodeable
9089 (form-encode* [x encoding]))
You can’t perform that action at this time.
0 commit comments