diff options
author | Werner Koch <wk@gnupg.org> | 2013-11-28 09:07:15 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2013-12-02 16:21:44 +0100 |
commit | 29eddc2558d4cf39995f66d5fccd62f584d5b203 (patch) | |
tree | 98bcfc81d4f8fce7bdba07e32bec47619002fe76 /src/gcrypt.h.in | |
parent | 3b1cc9e6c357574f54160298d731c18f3d717b6c (diff) | |
download | libgcrypt-29eddc2558d4cf39995f66d5fccd62f584d5b203.tar.gz |
mpi: Introduce 4 user flags for gcry_mpi_t.
* src/gcrypt.h.in (GCRYMPI_FLAG_USER1, GCRYMPI_FLAG_USER2)
(GCRYMPI_FLAG_USER3, GCRYMPI_FLAG_USER4): New.
* mpi/mpiutil.c (gcry_mpi_set_flag, gcry_mpi_clear_flag)
(gcry_mpi_get_flag, _gcry_mpi_free): Implement them.
(gcry_mpi_set_opaque): Keep user flags.
--
The space for the flags in the MPI struct is free and thus we can help
applications to make use of some flags. This is for example useful to
indicate that an MPI needs special processing before use.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'src/gcrypt.h.in')
-rw-r--r-- | src/gcrypt.h.in | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in index 625fa9fc..53133bf2 100644 --- a/src/gcrypt.h.in +++ b/src/gcrypt.h.in @@ -501,7 +501,11 @@ enum gcry_mpi_flag a way to store some bytes. This is useful for encrypted big integers. */ GCRYMPI_FLAG_IMMUTABLE = 4, /* Mark the MPI as immutable. */ - GCRYMPI_FLAG_CONST = 8 /* Mark the MPI as a constant. */ + GCRYMPI_FLAG_CONST = 8, /* Mark the MPI as a constant. */ + GCRYMPI_FLAG_USER1 = 0x0100,/* User flag 1. */ + GCRYMPI_FLAG_USER2 = 0x0200,/* User flag 2. */ + GCRYMPI_FLAG_USER3 = 0x0400,/* User flag 3. */ + GCRYMPI_FLAG_USER4 = 0x0800,/* User flag 4. */ }; |