Welcome to little lamb

Code » limb » master » tree

[master] / src / doc / buffer-shldata.h / buffer-shldata.h.0.md

% limb manual
% buffer-shldata.h(0)
% limb 0.1.0
% 2023-07-24

# NAME

buffer-shldata.h - buffer interface for shield data protocol

# SYNOPSIS

    #include <limb/buffer-shldata.h>

# DESCRIPTION

The header defines functions used to encrypt/decrypt data using the "shielded
data" protocol through the [buffer.h](0) interface.

Refer to [shldata](5) for more about shielded data protocol.

## Types

The following types are defined :

: *buffer_shldata_ctx*
:: An opaque structure to e given to the functions below.

## Macros

The following macros are defined :

: *BUFFER_SHLDATA_ZERO*
:: Value to initialize a *buffer_shldata_ctx* to.

## Functions

The following functions are defined :

: [buffer_shldata_putinit](3)
:: To initialize encryption of data through the shielded data protocol.

: [buffer_shldata_put](3)
:: To encrypt data through the shielded data protocol.

: [buffer_shldata_putfinal](3)
:: To finalize encryption of data through the shielded data protocol.

: [buffer_shldata_getinit_sa](3)
:: Similar to [buffer_shldata_getinit](3) but using the specified *stralloc* as
:: heap-allocated temporary space.

: [buffer_shldata_getinit](3)
:: To initialize decryption of data through the shielded data protocol.

: [buffer_shldata_datasize](3)
:: Returns the length of encrypted data to be decrypted through the shielded data
:: protocol.

: [buffer_shldata_get](3)
:: To decrypt data through the shielded data protocol.

: [buffer_shldata_getfinal_sa](3)
:: Similar to [buffer_shldata_getfinal](3) but using the specified *stralloc* as
:: heap-allocated temporary space.

: [buffer_shldata_getfinal](3)
:: To finalize decryption of data through the shielded data protocol.

: [buffer_shldata_free](3)
:: To free memory associated with the given opaque structure.