Comparable Bytes
-- TODO: Because we rely on the sorting of the hex string, -- it is super important to check that we only use -- lower case letters, but no uppercase.
A catch-all phantom type for bytes.
Break a Bytestring into a list of chunks. Chunks are of the given width, except the last chunk which is only at most the given width.
Same as [fromHex] except it does not check that the hex-encoded string is well formed. It is your responsability.
JSON encoder for Bytes.
JSON decoder for Bytes.
Compute the Blake2b-224 hash (28 bytes) of the given bytes.
Compute the Blake2b-256 hash (32 bytes) of the given bytes.
Compute the Blake2b-512 hash (64 bytes) of the given bytes.
Helper function to make up some bytes of a given length, starting by the given text when decoded as text.
Helper function to make up some bytes of a given length, starting with the provided bytes.
A custom
Bytes
type that is comparable with==
.Useful as otherwise, the original
Bytes
type fromelm/bytes
package cannot be used to compare for equality with==
. The phantom type parametera
indicates what type of Bytes are stored.