Hydro
The base hydrogen module. It includes functions for creating and handling hydrogen buffers.
=
defn
(Fn [(Ref (Array Byte) a), (Ref (Array Byte) b)] Bool)
(= a b)
compares two (Array Byte) instances in constant time. Comparing the
same reference will lead to a failed comparison, as per the hydrogen
specs.
from-hex
defn
(Fn [(Ref String a)] (Maybe (Array Byte)))
(from-hex s)
parses a string of hex digit pairs into an (Array Byte),
accepting both upper- and lowercase digits. Returns Nothing unless the whole
string is a sequence of hex digit pairs; separators are not allowed. The empty
string yields an empty array.