Liking cljdoc? Tell your friends :D

dk.simongray.wary-fetch.bytes

Bytes on both platforms, a byte array on the JVM and a Uint8Array in JavaScript, with the encodings, hashes and randomness that requests and their signatures need.

The hashes are synchronous on both platforms. In JavaScript they come from the Closure Library rather than WebCrypto, whose digests only come as promises.

Bytes on both platforms, a byte array on the JVM and a Uint8Array in
JavaScript, with the encodings, hashes and randomness that requests and
their signatures need.

The hashes are synchronous on both platforms. In JavaScript they come
from the Closure Library rather than WebCrypto, whose digests only come
as promises.
raw docstring

base64clj/s

(base64 b)

The bytes b in base64.

The bytes `b` in base64.
sourceraw docstring

base64urlclj/s

(base64url b)

The bytes b in the URL-safe alphabet of base64, without padding.

The bytes `b` in the URL-safe alphabet of base64, without padding.
sourceraw docstring

decodeclj/s

(decode b)

The text of the bytes b in UTF-8.

The text of the bytes `b` in UTF-8.
sourceraw docstring

digestclj/s

(digest algorithm b)

The digest of the bytes b by algorithm, :sha1, :sha256, :sha384 or :sha512, as bytes.

The digest of the bytes `b` by `algorithm`, :sha1, :sha256, :sha384 or
:sha512, as bytes.
sourceraw docstring

encodeclj/s

(encode s)

The text s as the bytes of its UTF-8.

The text `s` as the bytes of its UTF-8.
sourceraw docstring

hexclj/s

(hex b)

The bytes b in hexadecimal, two characters in lower case for each.

The bytes `b` in hexadecimal, two characters in lower case for each.
sourceraw docstring

hmacclj/s

(hmac algorithm key message)

The HMAC of the bytes message with the bytes key by algorithm, :sha1, :sha256, :sha384 or :sha512, as bytes.

The HMAC of the bytes `message` with the bytes `key` by `algorithm`,
:sha1, :sha256, :sha384 or :sha512, as bytes.
sourceraw docstring

lengthclj/s

(length b)

The number of bytes in b.

The number of bytes in `b`.
sourceraw docstring

ofclj/s

(of xs)

The bytes xs, numbers from 0 to 255, as the platform keeps bytes.

The bytes `xs`, numbers from 0 to 255, as the platform keeps bytes.
sourceraw docstring

randomclj/s

(random n)

n random bytes from the platform's secure source.

`n` random bytes from the platform's secure source.
sourceraw docstring

same-text?clj/s

(same-text? a b)

Whether a and b are the same text, in a time that doesn't tell where they differ. Nil or another value is never the same.

Whether `a` and `b` are the same text, in a time that doesn't tell where
they differ. Nil or another value is never the same.
sourceraw docstring

same?clj/s

(same? a b)

Whether the bytes a and b are the same, in a time that doesn't tell where they differ, as a comparison of secrets needs.

Whether the bytes `a` and `b` are the same, in a time that doesn't tell
where they differ, as a comparison of secrets needs.
sourceraw docstring

unbase64urlclj/s

(unbase64url s)

The bytes of the text s in the URL-safe alphabet of base64, with or without padding, or nil when it isn't.

The bytes of the text `s` in the URL-safe alphabet of base64, with or
without padding, or nil when it isn't.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close