(->byte-array x)Coerces x to byte[] for constant-time comparison.
Accepted:
Any other type throws ex-info {:type ::not-bytes :value x}.
Coerces `x` to byte[] for constant-time comparison.
Accepted:
- nil -> nil
- byte[] -> unchanged
- String -> UTF-8 bytes (see string->utf8-bytes)
- sequential -> byte[] via octet (range-checked); octets 0..255 and signed
bytes -128..127 are both accepted
Any other type throws ex-info {:type ::not-bytes :value x}.(bytes->hex bs)Returns the lowercase, zero-padded hex representation of byte array bs
(two characters per byte).
Returns the lowercase, zero-padded hex representation of byte array `bs` (two characters per byte).
(string->utf8-bytes s)Returns String s encoded as UTF-8 byte[].
The charset is explicit so results do not depend on the platform default.
Returns String `s` encoded as UTF-8 byte[]. The charset is explicit so results do not depend on the platform default.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |