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.
(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.
(decode b)The text of the bytes b in UTF-8.
The text of the bytes `b` in UTF-8.
(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.
(encode s)The text s as the bytes of its UTF-8.
The text `s` as the bytes of its UTF-8.
(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.
(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.
(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.
(random n)n random bytes from the platform's secure source.
`n` random bytes from the platform's secure source.
(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.
(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.
(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.
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 |