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.

buf

defn

(Fn [(Ref String a)] (Array Byte))

                    (buf s)
                

creates an (Array Byte) from a string.

context

defn

(Fn [(Ref String a)] (Ptr CChar))

                    (context s)
                

creates a context from a string.

erase

defn

(Fn [(Ref (Array Byte) a)] ())

                    (erase b)
                

erases the contents of a (Array Byte) securely.

raw

external

(Fn [(Ref (Array Byte) a)] (Ptr Byte))

unbuf

defn

(Fn [(Ref (Array Byte) a)] String)

                    (unbuf a)
                

creates a string from a (Array Byte).