(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"
(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"
(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
(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]
(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="
(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="
(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"
(to-hex-chars bytes)
turns a byte array into a hex char array
turns a byte array into a hex char array
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close