Crate mini_monocypher
source ·Expand description
mini-monocypher
A C-like Rust API for Monocypher
This documentation covers the usage of Monocypher through these bindings,
but for the intricacies regarding cryptographic usage and security hygiene
it is recommended to refer to the Monocypher
manual.
Enums
- Errors returned by Monocypher
Functions
- Encrypts and authenticates a plaintext. The output can then be decrypted by
crypto_aead_unlock
. - Decrypts an authenticated ciphertext. Returns
()
if successful, orErrorKind
if there is a decryption failure. - Computes a BLAKE2b hash for a message.
- Returns a BLAKE2b context for use with the incremental interface. Needs to be initialised with
crypto_blake2b_init
. - Computes the final BLAKE2b hash based on
ctx
. The output of the hash will reside inhash
. - Initialises a BLAKE2B context for use with the incremental interface.
- Computes a BLAKE2b Message Authentication Code (MAC) for a message.
- Incrementally computes a BLAKE2b hash based on
ctx
and a message. - Perform an X25519 key exchange between
your_secret_key
andtheir_public_key
. - Generate an X25519 public key from a secret key.