/*! \file */ /******************************************* * * * File auto-generated by `::safer_ffi`. * * * * Do not manually edit this file. * * * *******************************************/ #ifndef __RUST_DOUBLE_RATCHETS__ #define __RUST_DOUBLE_RATCHETS__ #ifdef __cplusplus extern "C" { #endif /** */ typedef struct FFIRatchetState FFIRatchetState_t; /** */ typedef struct FFIEncryptResult FFIEncryptResult_t; #include #include /** \brief * Same as [`Vec`][`rust::Vec`], but with guaranteed `#[repr(C)]` layout */ typedef struct Vec_uint8 { /** */ uint8_t * ptr; /** */ size_t len; /** */ size_t cap; } Vec_uint8_t; /** */ typedef struct CResult_Vec_uint8_Vec_uint8 { /** */ Vec_uint8_t ok; /** */ Vec_uint8_t err; } CResult_Vec_uint8_Vec_uint8_t; /** */ CResult_Vec_uint8_Vec_uint8_t double_ratchet_descrypt_message ( FFIRatchetState_t * state, FFIEncryptResult_t const * encrypted); /** */ FFIEncryptResult_t * double_ratchet_encrypt_message ( FFIRatchetState_t * state, Vec_uint8_t const * plaintext); typedef struct { uint8_t idx[32]; } uint8_32_array_t; /** */ typedef struct FFIInstallationKeyPair FFIInstallationKeyPair_t; /** */ FFIRatchetState_t * double_ratchet_init_receiver ( uint8_32_array_t shared_secret, FFIInstallationKeyPair_t const * keypair); /** */ FFIRatchetState_t * double_ratchet_init_sender ( uint8_32_array_t shared_secret, uint8_32_array_t remote_pub); /** */ void encrypt_result_destroy ( FFIEncryptResult_t * result); /** */ void ffi_c_string_free ( Vec_uint8_t s); /** */ void installation_key_pair_destroy ( FFIInstallationKeyPair_t * keypair); /** */ FFIInstallationKeyPair_t * installation_key_pair_generate (void); /** */ uint8_32_array_t installation_key_pair_public ( FFIInstallationKeyPair_t const * keypair); /** */ void ratchet_state_destroy ( FFIRatchetState_t * state); #ifdef __cplusplus } /* extern \"C\" */ #endif #endif /* __RUST_DOUBLE_RATCHETS__ */