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§
- Error
Kind - Errors returned by Monocypher
Functions§
- crypto_
aead_ lock - Encrypts and authenticates a plaintext. The output can then be decrypted
by
crypto_aead_unlock. - crypto_
aead_ unlock - Decrypts an authenticated ciphertext. Returns
()if successful, orErrorKindif there is a decryption failure. - crypto_
blake2b - Computes a BLAKE2b hash for a message.
- crypto_
blake2b_ ctx_ new - Returns a BLAKE2b context for use with the incremental interface.
Needs to be initialised with
crypto_blake2b_init. - crypto_
blake2b_ final - Computes the final BLAKE2b hash based on
ctx. The output of the hash will reside inhash. - crypto_
blake2b_ init - Initialises a BLAKE2B context for use with the incremental interface.
- crypto_
blake2b_ keyed - Computes a BLAKE2b Message Authentication Code (MAC) for a message.
- crypto_
blake2b_ update - Incrementally computes a BLAKE2b hash based on
ctxand a message. - crypto_
x25519 - Perform an X25519 key exchange between
your_secret_keyandtheir_public_key. - crypto_
x25519_ public_ key - Generate an X25519 public key from a secret key.