babble 0.2.0

An implementation of Noise protocols.
Documentation
/* automatically generated by rust-bindgen 0.59.2 */

#[repr(C)]
pub struct crypto_blake2b_ctx {
    pub hash: [u64; 8usize],
    pub input_offset: [u64; 2usize],
    pub input: [u64; 16usize],
    pub input_idx: usize,
    pub hash_size: usize,
}
extern "C" {
    pub fn crypto_lock_aead(
        mac: *mut [u8; 16usize],
        cipher_text: *mut u8,
        key: *const [u8; 32usize],
        nonce: *const [u8; 24usize],
        ad: *const u8,
        ad_size: usize,
        plain_text: *const u8,
        text_size: usize,
    );
}
extern "C" {
    pub fn crypto_unlock_aead(
        plain_text: *mut u8,
        key: *const [u8; 32usize],
        nonce: *const [u8; 24usize],
        mac: *const [u8; 16usize],
        ad: *const u8,
        ad_size: usize,
        cipher_text: *const u8,
        text_size: usize,
    ) -> crate::ctypes::c_int;
}
extern "C" {
    pub fn crypto_blake2b_update(
        ctx: *mut crypto_blake2b_ctx,
        message: *const u8,
        message_size: usize,
    );
}
extern "C" {
    pub fn crypto_blake2b_final(ctx: *mut crypto_blake2b_ctx, hash: *mut u8);
}
extern "C" {
    pub fn crypto_blake2b_general_init(
        ctx: *mut crypto_blake2b_ctx,
        hash_size: usize,
        key: *const u8,
        key_size: usize,
    );
}
extern "C" {
    pub fn crypto_argon2i(
        hash: *mut u8,
        hash_size: u32,
        work_area: *mut crate::ctypes::c_void,
        nb_blocks: u32,
        nb_iterations: u32,
        password: *const u8,
        password_size: u32,
        salt: *const u8,
        salt_size: u32,
    );
}
extern "C" {
    pub fn crypto_key_exchange(
        shared_key: *mut [u8; 32usize],
        your_secret_key: *const [u8; 32usize],
        their_public_key: *const [u8; 32usize],
    );
}
extern "C" {
    pub fn crypto_sign_public_key(public_key: *mut [u8; 32usize], secret_key: *const [u8; 32usize]);
}
extern "C" {
    pub fn crypto_sign(
        signature: *mut [u8; 64usize],
        secret_key: *const [u8; 32usize],
        public_key: *const [u8; 32usize],
        message: *const u8,
        message_size: usize,
    );
}
extern "C" {
    pub fn crypto_check(
        signature: *const [u8; 64usize],
        public_key: *const [u8; 32usize],
        message: *const u8,
        message_size: usize,
    ) -> crate::ctypes::c_int;
}