Macro sugar for AEAD ceremonies built on hive-system.crypto.core.
Provided as an opt-in convenience layer on top of the fn DSL — required only when call sites benefit from compact nested-let composition.
Use:
(let-aead [crypto (tink/->tink-crypto) key (core/random-key) {:keys [ciphertext iv]} (core/aead-seal! crypto key pt aad)] (core/aead-open! crypto key ciphertext iv aad))
let-aead short-circuits on the first :error Result — same semantics as
hive-dsl.result/let-ok — but accepts plain (non-Result) values for
adapter / key construction lines.
Macro sugar for AEAD ceremonies built on `hive-system.crypto.core`.
Provided as an opt-in convenience layer on top of the fn DSL — required
only when call sites benefit from compact nested-let composition.
Use:
(let-aead [crypto (tink/->tink-crypto)
key (core/random-key)
{:keys [ciphertext iv]} (core/aead-seal! crypto key pt aad)]
(core/aead-open! crypto key ciphertext iv aad))
`let-aead` short-circuits on the first :error Result — same semantics as
`hive-dsl.result/let-ok` — but accepts plain (non-Result) values for
adapter / key construction lines.(let-aead bindings & body)Like clojure.core/let, but bindings whose RHS evaluates to a hive-dsl Result short-circuit on :error. Non-Result RHS values bind normally.
Body returns either a Result or a plain value; values are wrapped via r/ok.
Like clojure.core/let, but bindings whose RHS evaluates to a hive-dsl Result short-circuit on :error. Non-Result RHS values bind normally. Body returns either a Result or a plain value; values are wrapped via r/ok.
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 |