releases-comm-central/third_party/libgcrypt/doc
Rob Lemley 8193329588 Bug 1577518 - Update libgcrypt to version 1.8.5. r=kaie
--HG--
extra : rebase_source : 2b0d98454a3035ffdddffa24f4e504b46ba0f0f1
2020-04-27 19:51:09 -04:00
..
ChangeLog-2011 Bug 1577646 - Fix encoding corruptions in imported libgcrypt library. r=me 2019-08-30 11:47:23 +02:00
DCO Bug 1518164 - Import the libgcrypt library code into the comm-central tree. r=mkmelin 2019-07-08 21:08:04 +00:00
HACKING Bug 1518164 - Import the libgcrypt library code into the comm-central tree. r=mkmelin 2019-07-08 21:08:04 +00:00
Makefile.am Bug 1518164 - Import the libgcrypt library code into the comm-central tree. r=mkmelin 2019-07-08 21:08:04 +00:00
Makefile.in Bug 1577518 - Update libgcrypt to version 1.8.5. r=kaie 2020-04-27 19:51:09 -04:00
README.apichanges Bug 1518164 - Import the libgcrypt library code into the comm-central tree. r=mkmelin 2019-07-08 21:08:04 +00:00
fips-fsm.eps Bug 1577518 - Update libgcrypt to version 1.8.5. r=kaie 2020-04-27 19:51:09 -04:00
fips-fsm.fig Bug 1518164 - Import the libgcrypt library code into the comm-central tree. r=mkmelin 2019-07-08 21:08:04 +00:00
fips-fsm.pdf Bug 1577518 - Update libgcrypt to version 1.8.5. r=kaie 2020-04-27 19:51:09 -04:00
fips-fsm.png Bug 1518164 - Import the libgcrypt library code into the comm-central tree. r=mkmelin 2019-07-08 21:08:04 +00:00
gcrypt.info Bug 1577518 - Update libgcrypt to version 1.8.5. r=kaie 2020-04-27 19:51:09 -04:00
gcrypt.info-1 Bug 1577518 - Update libgcrypt to version 1.8.5. r=kaie 2020-04-27 19:51:09 -04:00
gcrypt.info-2 Bug 1577518 - Update libgcrypt to version 1.8.5. r=kaie 2020-04-27 19:51:09 -04:00
gcrypt.texi Bug 1577518 - Update libgcrypt to version 1.8.5. r=kaie 2020-04-27 19:51:09 -04:00
gpl.texi Bug 1518164 - Import the libgcrypt library code into the comm-central tree. r=mkmelin 2019-07-08 21:08:04 +00:00
lgpl.texi Bug 1518164 - Import the libgcrypt library code into the comm-central tree. r=mkmelin 2019-07-08 21:08:04 +00:00
libgcrypt-modules.eps Bug 1577518 - Update libgcrypt to version 1.8.5. r=kaie 2020-04-27 19:51:09 -04:00
libgcrypt-modules.fig Bug 1518164 - Import the libgcrypt library code into the comm-central tree. r=mkmelin 2019-07-08 21:08:04 +00:00
libgcrypt-modules.pdf Bug 1577518 - Update libgcrypt to version 1.8.5. r=kaie 2020-04-27 19:51:09 -04:00
libgcrypt-modules.png Bug 1518164 - Import the libgcrypt library code into the comm-central tree. r=mkmelin 2019-07-08 21:08:04 +00:00
stamp-vti Bug 1577518 - Update libgcrypt to version 1.8.5. r=kaie 2020-04-27 19:51:09 -04:00
version.texi Bug 1577518 - Update libgcrypt to version 1.8.5. r=kaie 2020-04-27 19:51:09 -04:00
yat2m.c Bug 1518164 - Import the libgcrypt library code into the comm-central tree. r=mkmelin 2019-07-08 21:08:04 +00:00

README.apichanges

README.apichanges 2003-07-28

  NOTE: THESE ARE API CHANGES DONE BEFORE THE FIRST STABLE RELEASE SO
  THEY ARE NOT RELEVANT ANYMORE [stable is 1.2.4 right now]

We decided to change a couple of annoying things in Libgcrypt and to
cleanup the API.  The new API better fits into a multi-threaded
environment and is more consistent.  One import change is that all
functions return error codes from a set of error codes shared between
GnuPG, GPGME and Libgcrypt.

This file contains some hints on how to port your application from
libgcrypt <= 1.1.12 to the current API as of 1.1.42.  We hope that
there won't be another need for such a major change.


* Types

  All types definitions changed to a foo_t scheme; for some time we
  will support the old names but you better start to rename them:

  s/GCRY_MPI/gcry_mpi_t/
  s/GcryMPI/gcry_mpi_t/
  s/GCRY_SEXP/gcry_sexp_t/
  s/GcrySexp/gcry_sexp_t/
  s/GCRY_CIPHER_HD/gcry_cipher_hd_t/
  s/GcryCipherHd/gcry_cipher_hd_t/
  s/GCRY_MD_HD/gcry_md_hd_t/
  s/GcryMDHd/gcry_md_hd_t/

* Initialization

  For proper initialization of the library, you must call
  gcry_check_version() before calling any other function except for
  these gcry_control operations:
     GCRYCTL_SUSPEND_SECMEM_WARN
     GCRYCTL_DISABLE_INTERNAL_LOCKING
     GCRYCTL_ANY_INITIALIZATION_P
     GCRYCTL_INITIALIZATION_FINISHED_P


* Handles

  gcry_cipher_open and gcry_md_open do now return an error code
  instead of a NULL handle; the handle is now returned by
  asigning it to the first argument.  Example on how to change your
  code:

  Old:

    hd = gcry_md_open (algo, flags);
    if (!hd)
      {
         fprintf (stderr, "md_open failed: %s\n", gcry_errno (-1));
         ....

  New:

    rc = gcry_md_open (&hd, algo, flags);
    if (rc)
      {
         fprintf (stderr, "md_open failed: %s\n", gcry_strerror (rc));
         ....

  If you are not interested in the error code, you can do it in a
  simplified way:
 
    gcry_md_open (&hd, algo, flags);
    if (!hd)
        abort ();

  i.e. the function makes sure that HD points to NULL in case of an error.
  The required change for gcry_cipher_open is similar.

* Message Digests

  The order of the arguments to gcry_md_copy has been changed in order
  to be more consistent with other functions of this type.  This means
  that the new message digest handle will be a copy of the message
  handle specified by the second argument and stored at the address
  pointed to by the first argument.

* Error codes

  gcry_errno () has been removed because it is hard to use in
  multi-threaded environment.  You need to save the error code
  returned by the functions and use it either numerical or passing it
  to gcry_strerror (since gcry_strerror is a wrapper function for
  gpg_strerror, the latter function can also be used).

  Instead of using the error codes GCRYERR_*, you have to use the
  GPG_ERR_* names. 

* S-expressions

  gcry_sexp_canon_len used to return a `historical' error code in
  `errcode', this is not the case anymore; the value returned in
  `errcode' is now a standard Libgcrypt (i.e. gpg-error) error code.

* MPI

  gcry_mpi_scan and gcry_mpi_print need the size of a provided buffer
  as input and return the number of bytes actually scanned/printed to
  the user.  The old API used a single size_t Pointer for both tasks,
  the new API distinguishes between the input and the output values.

* Public Key cryptography

  gcry_pk_decrypt used to return a `simple S-expression part' that
  contains a single MPI value.  In case the `data' S-expression
  contains a `flags' element, the result S-expression is filled with a
  complete S-expression of the following format:

    (value PLAINTEXT)