DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(gcrypt.info.gz) Working with sets of data

Info Catalog (gcrypt.info.gz) Available asymmetric algorithms (gcrypt.info.gz) Public Key cryptography (II) (gcrypt.info.gz) Working with handles
 
 8.2 Working with sets of data
 =============================
 
 In the context of this interface the term `data set' refers to a list
 of `named MPI values' that is used by functions performing
 cryptographic operations.
 
    Such data sets are used for representing keys, since keys simply
 consist of a variable amount of numbers.  Furthermore some functions
 return data sets to the caller that are to be provided to other
 functions.
 
    This section documents the data types, symbols and functions that are
 relevant for working with such data sets.
 
  -- Data type: gcry_ac_data_t
      A data set, that is simply a list of named MPI values.
 
    The following flags are supported:
 
 `GCRY_AC_FLAG_DEALLOC'
      Used for storing data in a data set.  If given, the data will be
      released by the library.
 
 `GCRY_AC_FLAG_COPY'
      Used for storing/retrieving data in/from a data set.  If given, the
      library will create copies of the provided/contained data, which
      will then be given to the user/associated with the data set.
 
  -- Function: gcry_error_t gcry_ac_data_new (gcry_ac_data_t *DATA)
      Creates a new, empty data set and stores it in DATA.
 
  -- Function: void gcry_ac_data_destroy (gcry_ac_data_t DATA)
      Destroys the data set DATA.
 
  -- Function: gcry_error_t gcry_ac_data_set (gcry_ac_data_t DATA,
           unsigned int FLAGS, char *NAME, gcry_mpi_t MPI)
      Add the value MPI to DATA with the label NAME.  If FLAGS contains
      GCRY_AC_FLAG_DATA_COPY, the data set will contain copies of NAME
      and MPI.  If FLAGS contains GCRY_AC_FLAG_DATA_DEALLOC or
      GCRY_AC_FLAG_DATA_COPY, the values contained in the data set will
      be deallocated when they are to be removed from the data set.
 
  -- Function: gcry_error_t gcry_ac_data_copy (gcry_ac_data_t *DATA_CP,
           gcry_ac_data_t DATA)
      Create a copy of the data set DATA and store it in DATA_CP.
 
  -- Function: unsigned int gcry_ac_data_length (gcry_ac_data_t DATA)
      Returns the number of named MPI values inside of the data set DATA.
 
  -- Function: gcry_error_t gcry_ac_data_get_name (gcry_ac_data_t DATA,
           unsigned int FLAGS, char *NAME, gcry_mpi_t *MPI)
      Store the value labelled with NAME found in DATA in MPI.  If FLAGS
      contains GCRY_AC_FLAG_COPY, store a copy of the MPI value
      contained in the data set.  MPI may be NULL.
 
  -- Function: gcry_error_t gcry_ac_data_get_index (gcry_ac_data_t DATA,
           unsigned int flags, unsigned int INDEX, const char **NAME,
           gcry_mpi_t *MPI)
      Stores in NAME and MPI the named MPI value contained in the data
      set DATA with the index IDX.  If FLAGS contains GCRY_AC_FLAG_COPY,
      store copies of the values contained in the data set. NAME or MPI
      may be NULL.
 
  -- Function: void gcry_ac_data_clear (gcry_ac_data_t DATA)
      Destroys any values contained in the data set DATA.
 
Info Catalog (gcrypt.info.gz) Available asymmetric algorithms (gcrypt.info.gz) Public Key cryptography (II) (gcrypt.info.gz) Working with handles
automatically generated byinfo2html