Liking cljdoc? Tell your friends :D

hara.core.base.encode


+hex-array+clj


from-base64clj

(from-base64 input)

turns a base64 encoded string into a byte array

(-> (from-base64 "aGVsbG8=") (String.)) => "hello"

turns a base64 encoded string into a byte array

(-> (from-base64 "aGVsbG8=")
    (String.))
=> "hello"
raw docstring

from-hexclj

(from-hex s)

turns a hex string into a sequence of bytes

(String. (from-hex "68656c6c6f")) => "hello"

turns a hex string into a sequence of bytes

(String. (from-hex "68656c6c6f"))
=> "hello"
raw docstring

from-hex-charsclj

(from-hex-chars c1 c2)

turns two hex characters into a byte value

(byte (from-hex-chars \a)) => 42

turns two hex characters into a byte value

(byte (from-hex-chars  \a))
=> 42
raw docstring

hex-charsclj

(hex-chars b)

turns a byte into two chars

(hex-chars 255) => [\f \f]

(hex-chars 42) => [ \a]

turns a byte into two chars

(hex-chars 255)
=> [\f \f]

(hex-chars 42)
=> [ \a]
raw docstring

to-base64clj

(to-base64 bytes)

turns a byte array into a base64 encoded string

(-> (.getBytes "hello") (to-base64)) => "aGVsbG8="

turns a byte array into a base64 encoded string

(-> (.getBytes "hello")
    (to-base64))
=> "aGVsbG8="
raw docstring

to-base64-bytesclj

(to-base64-bytes bytes)

turns a byte array into a base64 encoding

(-> (.getBytes "hello") (to-base64-bytes) (String.)) => "aGVsbG8="

turns a byte array into a base64 encoding

(-> (.getBytes "hello")
    (to-base64-bytes)
    (String.))
=> "aGVsbG8="
raw docstring

to-hexclj

(to-hex bytes)

turns a byte array into hex string

(to-hex (.getBytes "hello")) => "68656c6c6f"

turns a byte array into hex string

(to-hex (.getBytes "hello"))
=> "68656c6c6f"
raw docstring

to-hex-charsclj

(to-hex-chars bytes)

turns a byte array into a hex char array

turns a byte array into a hex char array
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close