[−][src]Crate libthemis_sys
Raw FFI bindings to libthemis.
Re-exports
pub use self::themis_key_kind as themis_key_kind_t; |
Structs
secure_comparator_type | |
secure_session_peer_type | |
secure_session_type | |
secure_session_user_callbacks_type |
Enums
themis_key_kind |
Constants
Functions
secure_comparator_append_secret⚠ | |
secure_comparator_begin_compare⚠ | |
secure_comparator_create⚠ | |
secure_comparator_destroy⚠ | |
secure_comparator_get_result⚠ | |
secure_comparator_proceed_compare⚠ | |
secure_session_connect⚠ | |
secure_session_create⚠ | |
secure_session_destroy⚠ | |
secure_session_generate_connect_request⚠ | |
secure_session_get_remote_id⚠ | |
secure_session_is_established⚠ | |
secure_session_load⚠ | |
secure_session_peer_cleanup⚠ | |
secure_session_peer_init⚠ | |
secure_session_receive⚠ | |
secure_session_save⚠ | |
secure_session_send⚠ | |
secure_session_unwrap⚠ | |
secure_session_wrap⚠ | |
themis_gen_ec_key_pair⚠ | @brief generate EC key pair @param [out] private_key buffer for private key to store. May be set to NULL for private key length determination @param [in, out] private_key_length length of private_key @param [out] public_key buffer for public key to store. May be set to NULL for public key length determination @param [in, out] public_key_length length of public key @return THEMIS_SUCCESS on success or THEMIS_FAIL on failure @note If private_key==NULL or public_key==NULL or private_key_length is not enought for private key storage or public_key_length is not enought for public key storage then THEMIS_BUFFER_TOO_SMALL will return and private_key_length and public_key_length will store lengths of buffers needed for private key and public key store respectively |
themis_gen_rsa_key_pair⚠ | @brief generate RSA key pair @param [out] private_key buffer for private key to store. May be set to NULL for private key length determination @param [in, out] private_key_length length of private_key @param [out] public_key buffer for public key to store. May be set to NULL for public key length determination @param [in, out] public_key_length length of public key @return THEMIS_SUCCESS on success or THEMIS_FAIL on failure @note If private_key==NULL or public_key==NULL or private_key_length is not enought for private key storage or public_key_length is not enought for public key storage then THEMIS_BUFFER_TOO_SMALL will return and private_key_length and public_key_length will store lengths of buffers needed for private key and public key store respectively |
themis_get_asym_key_kind⚠ | @brief get Themis key kind @param [in] key key buffer @param [in] length length of key @return corresponding key kind if the buffer contains a key, or THEMIS_KEY_INVALID otherwise |
themis_is_valid_asym_key⚠ | @brief validate a Themis key @param [in] key key buffer to validate @param [in] length length of key @return THEMIS_SUCCESS if the buffer contains a valid Themis key, or an error code otherwise |
themis_secure_cell_decrypt_context_imprint⚠ | @brief decrypt @param [in] master_key master key @param [in] master_key_length length of master_key @param [in] encrypted_message message to decrypt @param [in] encrypted_message_length length of encrypted_message @param [in] context user defined context. May be set to NULL @param [in] context_length length of user_context @param [out] plain_message buffer for plain message store. May be set to NULL for plain message length determination @param [in, out] plain_message_length length of plain_message @return THEMIS_SUCCESS on success or THEMIS_FAIL on failure @note If plain_message==NULL or plain_message_length is not enought for plain message store then THEMIS_BUFFER_TOO_SMALL will return and plain_message_length will store length of buffer needed for plain1 message store |
themis_secure_cell_decrypt_seal⚠ | @brief decrypt @param [in] master_key master key @param [in] master_key_length length of master_key @param [in] user_context user defined context. May be set to NULL @param [in] user_context_length length of user_context @param [in] encrypted_message message to decrypt @param [in] encrypted_message_length length of encrypted_message @param [out] plain_message buffer for plain message store. May be set to NULL for plain message length determination @param [in, out] plain_message_length length of plain_message @return THEMIS_SUCCESS on success or THEMIS_FAIL on failure @note If plain_message==NULL or plain_message_length is not enought for plain message store then THEMIS_BUFFER_TOO_SMALL will return and plain_message_length will store length of buffer needed for plain1 message store |
themis_secure_cell_decrypt_token_protect⚠ | @brief decrypt @param [in] master_key master key @param [in] master_key_length length of master_key @param [in] user_context user defined context. May be set to NULL @param [in] user_context_length length of user_context @param [in] encrypted_message message to decrypt @param [in] encrypted_message_length length of encrypted_message @param [in] token additional authentication info @param [in] token_length length of additional authentication info @param [out] plain_message buffer for plain message store. May be set to NULL for plain message length determination @param [in, out] plain_message_length length of plain_message @return THEMIS_SUCCESS on success or THEMIS_FAIL on failure @note If plain_message==NULL or plain_message_length is not enought for plain message store then THEMIS_BUFFER_TOO_SMALL will return and plain_message_length will store length of buffer needed for plain1 message store |
themis_secure_cell_encrypt_context_imprint⚠ | @brief encrypt @param [in] master_key master key @param [in] master_key_length length of master_key @param [in] message message to encrypt @param [in] message_length length of message @param [in] context user defined context. May be set to NULL @param [in] context_length length of user_context @param [out] encrypted_message buffer for encrypted message store. May be set to NULL for encrypted message length determination @param [in, out] encrypted_message_length length of encrypted_message @return THEMIS_SUCCESS on success or THEMIS_FAIL on failure @note If encrypted_message==NULL or encrypted_message_length is not enought for encrypted message store then THEMIS_BUFFER_TOO_SMALL will return and encrypted_message_length will store length of buffer needed for encrypted message store |
themis_secure_cell_encrypt_seal⚠ | @brief encrypt @param [in] master_key master key @param [in] master_key_length length of master_key @param [in] user_context user defined context. May be set to NULL @param [in] user_context_length length of user_context @param [in] message message to encrypt @param [in] message_length length of message @param [out] encrypted_message buffer for encrypted message store. May be set to NULL for encrypted message length determination @param [in, out] encrypted_message_length length of encrypted_message @return THEMIS_SUCCESS on success or THEMIS_FAIL on failure @note If encrypted_message==NULL or encrypted_message_length is not enought for encrypted message store then THEMIS_BUFFER_TOO_SMALL will return and encrypted_message_length will store length of buffer needed for encrypted message store |
themis_secure_cell_encrypt_token_protect⚠ | @brief encrypt @param [in] master_key master key @param [in] master_key_length length of master_key @param [in] user_context user defined context. May be set to NULL @param [in] user_context_length length of user_context @param [in] message message to encrypt @param [in] message_length length of message @param [out] token additional authentication info. May be set to NULL for additional authentication info length determination @param [in, out] token_length length of additional authentication info @param [out] encrypted_message buffer for encrypted message store. May be set to NULL for encrypted message length determination @param [in, out] encrypted_message_length length of encrypted_message @return THEMIS_SUCCESS on success or THEMIS_FAIL on failure @note If encrypted_message==NULL or context==NULL or encrypted_message_length is not enought for encrypted message or context_length is not enougth for additional authentication info store then THEMIS_BUFFER_TOO_SMALL will return and encrypted_message_length will store length of buffer needed for encrypted message store and context_length will store length of buuffer needed for additional authentication info store |
themis_secure_message_decrypt⚠ | @brief decrypt secure message to plaintext message @param [in] private_key private key @param [in] private_key_length length of private_key @param [in] public_key peer public key @param [in] public_key_length length of public_key @param [in] encrypted_message encrypted message to decrypt @param [in] encrypted_message_length length of encrypted_message @param [out] message buffer for plaintext message. May be set to NULL to determine expected length of plaintext message @param [in, out] message_length length of message @return THEMIS_SUCCESS on success or an error code on failure @note If message is NULL or message_length is not enough to store the plaintext message then THEMIS_BUFFER_TOO_SMALL will be returned and message_length will contain the length of the buffer needed to store the encrypted message. |
themis_secure_message_encrypt⚠ | @brief encrypt message to secure message @param [in] private_key private key @param [in] private_key_length length of private_key @param [in] public_key peer public key @param [in] public_key_length length of public_key @param [in] message message to encrypt @param [in] message_length length of message @param [out] encrypted_message buffer for encrypted message. May be set to NULL to determine expected length of encrypted message @param [in, out] encrypted_message_length length of encrypted_message @return THEMIS_SUCCESS on success or an error code on failure @note If encrypted_message is NULL or encrypted_message_length is not enough to store the encrypted message then THEMIS_BUFFER_TOO_SMALL will be returned and encrypted_message_length will contain the length of the buffer needed to store the encrypted message. |
themis_secure_message_sign⚠ | @brief securely sign a message @param [in] private_key private key @param [in] private_key_length length of private_key @param [in] message message to sign @param [in] message_length length of message @param [out] signed_message buffer for signed message. May be set to NULL to determine expected length of signed message @param [in, out] signed_message_length length of signed_message @return THEMIS_SUCCESS on success or an error code on failure @note If signed_message is NULL or signed_message_length is not enough to store the signed message then THEMIS_BUFFER_TOO_SMALL will be returned and signed_message_length will contain the length of the buffer needed to store the signed message. |
themis_secure_message_unwrap⚠ | @brief unwrap secure message to plain message @param [in] private_key private key @param [in] private_key_length length of private_key @param [in] public_key peer public key @param [in] public_key_length length of public_key @param [in] wrapped_message wrapped message to unwrap @param [in] wrapped_message_length length of wrapped_message @param [out] message buffer for plain message store. May be set to NULL for plain message length determination @param [in, out] message_length length of message @return THEMIS_SUCCESS on success or THEMIS_FAIL on failure @note If message==NULL or message_length is not enought for plain message storage then THEMIS_BUFFER_TOO_SMALL will return and message_length will store length of buffer needed for plain message store |
themis_secure_message_verify⚠ | @brief verify signature on a signed message @param [in] public_key peer public key @param [in] public_key_length length of public_key @param [in] signed_message signed message to verify @param [in] signed_message_length length of signed_message @param [out] message buffer for original message (without signature). May be set to NULL to determine expected length of original message @param [in, out] message_length length of message @return THEMIS_SUCCESS on success or an error code on failure @note If message is NULL or message_length is not enough to store the original message then THEMIS_BUFFER_TOO_SMALL will be returned and message_length will contain the length of the buffer needed to store the original message. |
themis_secure_message_wrap⚠ | @brief wrap message to secure message @param [in] private_key private key @param [in] private_key_length length of private_key @param [in] public_key peer public key @param [in] public_key_length length of public_key @param [in] message message to wrap @param [in] message_length length of message @param [out] wrapped_message buffer for wrapped message store. May be set to NULL for wrapped message length determination @param [in, out] wrapped_message_length length of wrapped_message @return THEMIS_SUCCESS on success or THEMIS_FAIL on failure @note If wrapped_message==NULL or wrapped_message_length is not enought for wrapped message storage then THEMIS_BUFFER_TOO_SMALL will return and wrapped_message_length will store length of buffer needed for wrapped message store |
Type Definitions
__int32_t | |
__ssize_t | |
__uint8_t | |
get_public_key_for_id_callback | @brief get public key by id callbeck tyoedef |
protocol_state_changed_callback | @brief state change callbeck tyoedef |
receive_protocol_data_callback | @brief receive data callbeck tyoedef |
secure_comparator_t | |
secure_session_handler | |
secure_session_peer_t | |
secure_session_t | |
secure_session_user_callbacks_t | |
send_protocol_data_callback | @brief send data callbeck tyoedef |
themis_status_t | @brief return type |