KCl v0.3.0 Kcl
A poor NaCl crypto suite substitute
The functions exposed here are the equivalent of (and interoperable with):
crypto_box_curve25519xsalsa20poly1305
crypto_box_curve25519xsalsa20poly1305_open
crypto_secretbox_curve25519xsalsa20poly1305
crypto_secretbox_curve25519xsalsa20poly1305_open
At this time, no support is provided for multiple packets/streaming or nonce-agreement.
Summary
Functions
box up an authenticated packet
derive a public key from a private key
generate a private/public key pair
pre-compute a shared key
unbox an authenticated packet
Types
Functions
Specs
box(binary, nonce, key, key) :: {binary, Kcl.State.t}
box up an authenticated packet
derive a public key from a private key
generate a private/public key pair
Specs
unbox(binary, nonce, key, key) ::
{binary, Kcl.State.t} |
:error
unbox an authenticated packet
Returns :error
when the packet contents cannot be authenticated, otherwise
the decrypted payload and updated state.