⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢠⣴⣿⣿⣿⣷⣼⣿⠀⣴⠾⠷⠶⠦⡄⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⢠⡤⢶⣦⣾⣿⣿⣿⣿⣿⣿⣿⠀⣿⣶⣶⣦⣄⠳⣤⣤⠄⠀⠀⠀
⠀⠀⠀⢀⣼⣳⡿⢻⣿⣿⣿⣿⣿⣿⣿⣿⣶⣿⣿⣗⠈⠙⠻⣶⣄⡀⠀⠀⠀
⠀⠀⠀⣰⠿⠁⢀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡄⠀⠀⠈⠳⣤⠀⠀
⠀⠀⢀⡟⠀⢰⣿⠟⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⠉⠁⠈⠻⣶⣄⠀⠀⠈⠛⢦   
⠀⣀⡼⠃⠀⣼⡟⠀⠀⢸⣿⡿⠉⣿⡿⠿⠛⣿⡄⠀⠀⠀⠙⠿⣆⠀⠀⠀⠈
⠈⠁⠀⠀⢸⡟⠀⠀⠀⢸⣿⠀⠀⣿⠁⠀⠀⠈⠃⠀⠀⠀⠀⠀⠘⢷⡄⠀⠀
⠀⠀⠀⠀⣼⠃⠀⠀⠀⢸⡟⠀⠀⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⡆⠀
⠀⠀⠀⣠⡏⠀⠀⠀⠀⣼⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠻⠃⠀⠀⠀⠀⣻⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ 
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

Current Dir: /usr/include/

[DIR] GL [ delete | rename ]
[DIR] KF5 [ delete | rename ]
[DIR] X11 [ delete | rename ]
[DIR] apache2 [ delete | rename ]
[DIR] arpa [ delete | rename ]
[DIR] asm [ delete | rename ]
[DIR] asm-generic [ delete | rename ]
[DIR] bind9 [ delete | rename ]
[DIR] bits [ delete | rename ]
[DIR] bsock [ delete | rename ]
[DIR] c++ [ delete | rename ]
[DIR] criu [ delete | rename ]
[DIR] db4.7.25 [ delete | rename ]
[DIR] drm [ delete | rename ]
[DIR] e2p [ delete | rename ]
[DIR] et [ delete | rename ]
[DIR] ext2fs [ delete | rename ]
[DIR] fontconfig [ delete | rename ]
[DIR] freetype2 [ delete | rename ]
[DIR] gdbm [ delete | rename ]
[DIR] gnu [ delete | rename ]
[DIR] google [ delete | rename ]
[DIR] gssapi [ delete | rename ]
[DIR] gssrpc [ delete | rename ]
[DIR] kadm5 [ delete | rename ]
[DIR] kde4 [ delete | rename ]
[DIR] krb5 [ delete | rename ]
[DIR] libdb [ delete | rename ]
[DIR] libexslt [ delete | rename ]
[DIR] libltdl [ delete | rename ]
[DIR] libpng15 [ delete | rename ]
[DIR] libxml2 [ delete | rename ]
[DIR] libxslt [ delete | rename ]
[DIR] linux [ delete | rename ]
[DIR] lzma [ delete | rename ]
[DIR] misc [ delete | rename ]
[DIR] mtd [ delete | rename ]
[DIR] mysql [ delete | rename ]
[DIR] ncurses [ delete | rename ]
[DIR] ncursesw [ delete | rename ]
[DIR] net [ delete | rename ]
[DIR] netash [ delete | rename ]
[DIR] netatalk [ delete | rename ]
[DIR] netax25 [ delete | rename ]
[DIR] neteconet [ delete | rename ]
[DIR] netinet [ delete | rename ]
[DIR] netipx [ delete | rename ]
[DIR] netiucv [ delete | rename ]
[DIR] netpacket [ delete | rename ]
[DIR] netrom [ delete | rename ]
[DIR] netrose [ delete | rename ]
[DIR] nfs [ delete | rename ]
[DIR] openssl [ delete | rename ]
[DIR] protobuf-c [ delete | rename ]
[DIR] protocols [ delete | rename ]
[DIR] python2.7 [ delete | rename ]
[DIR] python3.6m [ delete | rename ]
[DIR] quota [ delete | rename ]
[DIR] rdma [ delete | rename ]
[DIR] rpc [ delete | rename ]
[DIR] rpcsvc [ delete | rename ]
[DIR] sasl [ delete | rename ]
[DIR] scsi [ delete | rename ]
[DIR] security [ delete | rename ]
[DIR] selinux [ delete | rename ]
[DIR] sepol [ delete | rename ]
[DIR] sound [ delete | rename ]
[DIR] sys [ delete | rename ]
[DIR] uapi [ delete | rename ]
[DIR] uuid [ delete | rename ]
[DIR] video [ delete | rename ]
[DIR] xcb [ delete | rename ]
[DIR] xen [ delete | rename ]
[FILE] FlexLexer.h [ edit | delete | rename | download ]
[FILE] _G_config.h [ edit | delete | rename | download ]
[FILE] a.out.h [ edit | delete | rename | download ]
[FILE] aio.h [ edit | delete | rename | download ]
[FILE] aliases.h [ edit | delete | rename | download ]
[FILE] alloca.h [ edit | delete | rename | download ]
[FILE] ar.h [ edit | delete | rename | download ]
[FILE] argp.h [ edit | delete | rename | download ]
[FILE] argz.h [ edit | delete | rename | download ]
[FILE] assert.h [ edit | delete | rename | download ]
[FILE] autosprintf.h [ edit | delete | rename | download ]
[FILE] byteswap.h [ edit | delete | rename | download ]
[FILE] com_err.h [ edit | delete | rename | download ]
[FILE] complex.h [ edit | delete | rename | download ]
[FILE] cpio.h [ edit | delete | rename | download ]
[FILE] cpufreq.h [ edit | delete | rename | download ]
[FILE] crypt.h [ edit | delete | rename | download ]
[FILE] ctype.h [ edit | delete | rename | download ]
[FILE] curses.h [ edit | delete | rename | download ]
[FILE] cursesapp.h [ edit | delete | rename | download ]
[FILE] cursesf.h [ edit | delete | rename | download ]
[FILE] cursesm.h [ edit | delete | rename | download ]
[FILE] cursesp.h [ edit | delete | rename | download ]
[FILE] cursesw.h [ edit | delete | rename | download ]
[FILE] cursslk.h [ edit | delete | rename | download ]
[FILE] db.h [ edit | delete | rename | download ]
[FILE] db_185.h [ edit | delete | rename | download ]
[FILE] dbm.h [ edit | delete | rename | download ]
[FILE] dirent.h [ edit | delete | rename | download ]
[FILE] dlfcn.h [ edit | delete | rename | download ]
[FILE] elf.h [ edit | delete | rename | download ]
[FILE] endian.h [ edit | delete | rename | download ]
[FILE] entities.h [ edit | delete | rename | download ]
[FILE] envz.h [ edit | delete | rename | download ]
[FILE] err.h [ edit | delete | rename | download ]
[FILE] errno.h [ edit | delete | rename | download ]
[FILE] error.h [ edit | delete | rename | download ]
[FILE] eti.h [ edit | delete | rename | download ]
[FILE] etip.h [ edit | delete | rename | download ]
[FILE] execinfo.h [ edit | delete | rename | download ]
[FILE] expat.h [ edit | delete | rename | download ]
[FILE] expat_external.h [ edit | delete | rename | download ]
[FILE] fcntl.h [ edit | delete | rename | download ]
[FILE] features.h [ edit | delete | rename | download ]
[FILE] fenv.h [ edit | delete | rename | download ]
[FILE] fmtmsg.h [ edit | delete | rename | download ]
[FILE] fnmatch.h [ edit | delete | rename | download ]
[FILE] form.h [ edit | delete | rename | download ]
[FILE] fpu_control.h [ edit | delete | rename | download ]
[FILE] fstab.h [ edit | delete | rename | download ]
[FILE] fts.h [ edit | delete | rename | download ]
[FILE] ftw.h [ edit | delete | rename | download ]
[FILE] gconv.h [ edit | delete | rename | download ]
[FILE] gcrypt-module.h [ edit | delete | rename | download ]
[FILE] gcrypt.h [ edit | delete | rename | download ]
[FILE] gd.h [ edit | delete | rename | download ]
[FILE] gd_io.h [ edit | delete | rename | download ]
[FILE] gdbm.h [ edit | delete | rename | download ]
[FILE] gdcache.h [ edit | delete | rename | download ]
[FILE] gdfontg.h [ edit | delete | rename | download ]
[FILE] gdfontl.h [ edit | delete | rename | download ]
[FILE] gdfontmb.h [ edit | delete | rename | download ]
[FILE] gdfonts.h [ edit | delete | rename | download ]
[FILE] gdfontt.h [ edit | delete | rename | download ]
[FILE] gdfx.h [ edit | delete | rename | download ]
[FILE] gelf.h [ edit | delete | rename | download ]
[FILE] getopt.h [ edit | delete | rename | download ]
[FILE] gettext-po.h [ edit | delete | rename | download ]
[FILE] glob.h [ edit | delete | rename | download ]
[FILE] gnu-versions.h [ edit | delete | rename | download ]
[FILE] gpg-error.h [ edit | delete | rename | download ]
[FILE] grp.h [ edit | delete | rename | download ]
[FILE] gshadow.h [ edit | delete | rename | download ]
[FILE] gssapi.h [ edit | delete | rename | download ]
[FILE] iconv.h [ edit | delete | rename | download ]
[FILE] idn-free.h [ edit | delete | rename | download ]
[FILE] idn-int.h [ edit | delete | rename | download ]
[FILE] idna.h [ edit | delete | rename | download ]
[FILE] ieee754.h [ edit | delete | rename | download ]
[FILE] ifaddrs.h [ edit | delete | rename | download ]
[FILE] inttypes.h [ edit | delete | rename | download ]
[FILE] jconfig.h [ edit | delete | rename | download ]
[FILE] jerror.h [ edit | delete | rename | download ]
[FILE] jmorecfg.h [ edit | delete | rename | download ]
[FILE] jpeglib.h [ edit | delete | rename | download ]
[FILE] kdb.h [ edit | delete | rename | download ]
[FILE] keyutils.h [ edit | delete | rename | download ]
[FILE] krad.h [ edit | delete | rename | download ]
[FILE] krb5.h [ edit | delete | rename | download ]
[FILE] langinfo.h [ edit | delete | rename | download ]
[FILE] lastlog.h [ edit | delete | rename | download ]
[FILE] lauxlib.h [ edit | delete | rename | download ]
[FILE] lber.h [ edit | delete | rename | download ]
[FILE] lber_types.h [ edit | delete | rename | download ]
[FILE] ldap.h [ edit | delete | rename | download ]
[FILE] ldap_cdefs.h [ edit | delete | rename | download ]
[FILE] ldap_features.h [ edit | delete | rename | download ]
[FILE] ldap_schema.h [ edit | delete | rename | download ]
[FILE] ldap_utf8.h [ edit | delete | rename | download ]
[FILE] ldif.h [ edit | delete | rename | download ]
[FILE] libaio.h [ edit | delete | rename | download ]
[FILE] libelf.h [ edit | delete | rename | download ]
[FILE] libgen.h [ edit | delete | rename | download ]
[FILE] libintl.h [ edit | delete | rename | download ]
[FILE] libio.h [ edit | delete | rename | download ]
[FILE] limits.h [ edit | delete | rename | download ]
[FILE] link.h [ edit | delete | rename | download ]
[FILE] locale.h [ edit | delete | rename | download ]
[FILE] ltdl.h [ edit | delete | rename | download ]
[FILE] lua.h [ edit | delete | rename | download ]
[FILE] lua.hpp [ edit | delete | rename | download ]
[FILE] luaconf.h [ edit | delete | rename | download ]
[FILE] lualib.h [ edit | delete | rename | download ]
[FILE] lzma.h [ edit | delete | rename | download ]
[FILE] malloc.h [ edit | delete | rename | download ]
[FILE] math.h [ edit | delete | rename | download ]
[FILE] mcheck.h [ edit | delete | rename | download ]
[FILE] memory.h [ edit | delete | rename | download ]
[FILE] menu.h [ edit | delete | rename | download ]
[FILE] mntent.h [ edit | delete | rename | download ]
[FILE] monetary.h [ edit | delete | rename | download ]
[FILE] mqueue.h [ edit | delete | rename | download ]
[FILE] nc_tparm.h [ edit | delete | rename | download ]
[FILE] ncurses.h [ edit | delete | rename | download ]
[FILE] ncurses_dll.h [ edit | delete | rename | download ]
[FILE] ndbm.h [ edit | delete | rename | download ]
[FILE] netdb.h [ edit | delete | rename | download ]
[FILE] nl_types.h [ edit | delete | rename | download ]
[FILE] nlist.h [ edit | delete | rename | download ]
[FILE] nss.h [ edit | delete | rename | download ]
[FILE] obstack.h [ edit | delete | rename | download ]
[FILE] panel.h [ edit | delete | rename | download ]
[FILE] paths.h [ edit | delete | rename | download ]
[FILE] pcre.h [ edit | delete | rename | download ]
[FILE] pcre_scanner.h [ edit | delete | rename | download ]
[FILE] pcre_stringpiece.h [ edit | delete | rename | download ]
[FILE] pcrecpp.h [ edit | delete | rename | download ]
[FILE] pcrecpparg.h [ edit | delete | rename | download ]
[FILE] pcreposix.h [ edit | delete | rename | download ]
[FILE] png.h [ edit | delete | rename | download ]
[FILE] pngconf.h [ edit | delete | rename | download ]
[FILE] pnglibconf.h [ edit | delete | rename | download ]
[FILE] poll.h [ edit | delete | rename | download ]
[FILE] pr29.h [ edit | delete | rename | download ]
[FILE] printf.h [ edit | delete | rename | download ]
[FILE] profile.h [ edit | delete | rename | download ]
[FILE] pthread.h [ edit | delete | rename | download ]
[FILE] pty.h [ edit | delete | rename | download ]
[FILE] punycode.h [ edit | delete | rename | download ]
[FILE] pwd.h [ edit | delete | rename | download ]
[FILE] re_comp.h [ edit | delete | rename | download ]
[FILE] regex.h [ edit | delete | rename | download ]
[FILE] regexp.h [ edit | delete | rename | download ]
[FILE] resolv.h [ edit | delete | rename | download ]
[FILE] sched.h [ edit | delete | rename | download ]
[FILE] search.h [ edit | delete | rename | download ]
[FILE] semaphore.h [ edit | delete | rename | download ]
[FILE] setjmp.h [ edit | delete | rename | download ]
[FILE] sgtty.h [ edit | delete | rename | download ]
[FILE] shadow.h [ edit | delete | rename | download ]
[FILE] signal.h [ edit | delete | rename | download ]
[FILE] slapi-plugin.h [ edit | delete | rename | download ]
[FILE] spawn.h [ edit | delete | rename | download ]
[FILE] stab.h [ edit | delete | rename | download ]
[FILE] stdc-predef.h [ edit | delete | rename | download ]
[FILE] stdint.h [ edit | delete | rename | download ]
[FILE] stdio.h [ edit | delete | rename | download ]
[FILE] stdio_ext.h [ edit | delete | rename | download ]
[FILE] stdlib.h [ edit | delete | rename | download ]
[FILE] string.h [ edit | delete | rename | download ]
[FILE] stringprep.h [ edit | delete | rename | download ]
[FILE] strings.h [ edit | delete | rename | download ]
[FILE] syscall.h [ edit | delete | rename | download ]
[FILE] sysexits.h [ edit | delete | rename | download ]
[FILE] syslog.h [ edit | delete | rename | download ]
[FILE] tar.h [ edit | delete | rename | download ]
[FILE] tcpd.h [ edit | delete | rename | download ]
[FILE] term.h [ edit | delete | rename | download ]
[FILE] term_entry.h [ edit | delete | rename | download ]
[FILE] termcap.h [ edit | delete | rename | download ]
[FILE] termio.h [ edit | delete | rename | download ]
[FILE] termios.h [ edit | delete | rename | download ]
[FILE] tgmath.h [ edit | delete | rename | download ]
[FILE] thread_db.h [ edit | delete | rename | download ]
[FILE] tic.h [ edit | delete | rename | download ]
[FILE] tiff.h [ edit | delete | rename | download ]
[FILE] tiffconf-64.h [ edit | delete | rename | download ]
[FILE] tiffconf.h [ edit | delete | rename | download ]
[FILE] tiffio.h [ edit | delete | rename | download ]
[FILE] tiffio.hxx [ edit | delete | rename | download ]
[FILE] tiffvers.h [ edit | delete | rename | download ]
[FILE] time.h [ edit | delete | rename | download ]
[FILE] tld.h [ edit | delete | rename | download ]
[FILE] ttyent.h [ edit | delete | rename | download ]
[FILE] uchar.h [ edit | delete | rename | download ]
[FILE] ucontext.h [ edit | delete | rename | download ]
[FILE] ulimit.h [ edit | delete | rename | download ]
[FILE] unctrl.h [ edit | delete | rename | download ]
[FILE] unistd.h [ edit | delete | rename | download ]
[FILE] ustat.h [ edit | delete | rename | download ]
[FILE] utime.h [ edit | delete | rename | download ]
[FILE] utmp.h [ edit | delete | rename | download ]
[FILE] utmpx.h [ edit | delete | rename | download ]
[FILE] values.h [ edit | delete | rename | download ]
[FILE] verto-module.h [ edit | delete | rename | download ]
[FILE] verto.h [ edit | delete | rename | download ]
[FILE] wait.h [ edit | delete | rename | download ]
[FILE] wchar.h [ edit | delete | rename | download ]
[FILE] wctype.h [ edit | delete | rename | download ]
[FILE] wordexp.h [ edit | delete | rename | download ]
[FILE] xlocale.h [ edit | delete | rename | download ]
[FILE] zconf.h [ edit | delete | rename | download ]
[FILE] zlib.h [ edit | delete | rename | download ]

Viewing: /usr/include/gcrypt-module.h

/* gcrypt-module.h - GNU Cryptographic Library Interface
   Copyright (C) 2003, 2007 Free Software Foundation, Inc.

   This file is part of Libgcrypt.

   Libgcrypt is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as
   published by the Free Software Foundation; either version 2.1 of
   the License, or (at your option) any later version.

   Libgcrypt is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with this program; if not, see <http://www.gnu.org/licenses/>.
 */

/*
   This file contains the necessary declarations/definitions for
   working with Libgcrypt modules.
 */

#ifndef _GCRYPT_MODULE_H
#define _GCRYPT_MODULE_H

#ifdef __cplusplus
extern "C" {
#if 0 /* keep Emacsens's auto-indent happy */
}
#endif
#endif

/* The interfaces using the module system reserve a certain range of
   IDs for application use.  These IDs are not valid within Libgcrypt
   but Libgcrypt makes sure never to allocate such a module ID.  */
#define GCRY_MODULE_ID_USER      1024
#define GCRY_MODULE_ID_USER_LAST 4095


/* This type represents a `module'.  */
typedef struct gcry_module *gcry_module_t;

/* Check that the library fulfills the version requirement.  */

/* Type for the cipher_setkey function.  */
typedef gcry_err_code_t (*gcry_cipher_setkey_t) (void *c,
						 const unsigned char *key,
						 unsigned keylen);

/* Type for the cipher_encrypt function.  */
typedef void (*gcry_cipher_encrypt_t) (void *c,
				       unsigned char *outbuf,
				       const unsigned char *inbuf);

/* Type for the cipher_decrypt function.  */
typedef void (*gcry_cipher_decrypt_t) (void *c,
				       unsigned char *outbuf,
				       const unsigned char *inbuf);

/* Type for the cipher_stencrypt function.  */
typedef void (*gcry_cipher_stencrypt_t) (void *c,
					 unsigned char *outbuf,
					 const unsigned char *inbuf,
					 unsigned int n);

/* Type for the cipher_stdecrypt function.  */
typedef void (*gcry_cipher_stdecrypt_t) (void *c,
					 unsigned char *outbuf,
					 const unsigned char *inbuf,
					 unsigned int n);

typedef struct gcry_cipher_oid_spec
{
  const char *oid;
  int mode;
} gcry_cipher_oid_spec_t;

/* Module specification structure for ciphers.  */
typedef struct gcry_cipher_spec
{
  const char *name;
  const char **aliases;
  gcry_cipher_oid_spec_t *oids;
  size_t blocksize;
  size_t keylen;
  size_t contextsize;
  gcry_cipher_setkey_t setkey;
  gcry_cipher_encrypt_t encrypt;
  gcry_cipher_decrypt_t decrypt;
  gcry_cipher_stencrypt_t stencrypt;
  gcry_cipher_stdecrypt_t stdecrypt;
} gcry_cipher_spec_t;

/* Register a new cipher module whose specification can be found in
   CIPHER.  On success, a new algorithm ID is stored in ALGORITHM_ID
   and a pointer representing this module is stored in MODULE.  */
gcry_error_t gcry_cipher_register (gcry_cipher_spec_t *cipher,
				   int *algorithm_id,
				   gcry_module_t *module)
  /* */  _GCRY_ATTR_INTERNAL;


/* Unregister the cipher identified by MODULE, which must have been
   registered with gcry_cipher_register.  */
void gcry_cipher_unregister (gcry_module_t module)
  /* */  _GCRY_ATTR_INTERNAL;

/* ********************** */

/* Type for the pk_generate function.  */
typedef gcry_err_code_t (*gcry_pk_generate_t) (int algo,
					       unsigned int nbits,
					       unsigned long use_e,
					       gcry_mpi_t *skey,
					       gcry_mpi_t **retfactors);

/* Type for the pk_check_secret_key function.  */
typedef gcry_err_code_t (*gcry_pk_check_secret_key_t) (int algo,
						       gcry_mpi_t *skey);

/* Type for the pk_encrypt function.  */
typedef gcry_err_code_t (*gcry_pk_encrypt_t) (int algo,
					      gcry_mpi_t *resarr,
					      gcry_mpi_t data,
					      gcry_mpi_t *pkey,
					      int flags);

/* Type for the pk_decrypt function.  */
typedef gcry_err_code_t (*gcry_pk_decrypt_t) (int algo,
					      gcry_mpi_t *result,
					      gcry_mpi_t *data,
					      gcry_mpi_t *skey,
					      int flags);

/* Type for the pk_sign function.  */
typedef gcry_err_code_t (*gcry_pk_sign_t) (int algo,
					   gcry_mpi_t *resarr,
					   gcry_mpi_t data,
					   gcry_mpi_t *skey);

/* Type for the pk_verify function.  */
typedef gcry_err_code_t (*gcry_pk_verify_t) (int algo,
					     gcry_mpi_t hash,
					     gcry_mpi_t *data,
					     gcry_mpi_t *pkey,
					     int (*cmp) (void *, gcry_mpi_t),
					     void *opaquev);

/* Type for the pk_get_nbits function.  */
typedef unsigned (*gcry_pk_get_nbits_t) (int algo, gcry_mpi_t *pkey);

/* Module specification structure for message digests.  */
typedef struct gcry_pk_spec
{
  const char *name;
  const char **aliases;
  const char *elements_pkey;
  const char *elements_skey;
  const char *elements_enc;
  const char *elements_sig;
  const char *elements_grip;
  int use;
  gcry_pk_generate_t generate;
  gcry_pk_check_secret_key_t check_secret_key;
  gcry_pk_encrypt_t encrypt;
  gcry_pk_decrypt_t decrypt;
  gcry_pk_sign_t sign;
  gcry_pk_verify_t verify;
  gcry_pk_get_nbits_t get_nbits;
} gcry_pk_spec_t;

/* Register a new pubkey module whose specification can be found in
   PUBKEY.  On success, a new algorithm ID is stored in ALGORITHM_ID
   and a pointer representhing this module is stored in MODULE.  */
gcry_error_t gcry_pk_register (gcry_pk_spec_t *pubkey,
			       unsigned int *algorithm_id,
			       gcry_module_t *module)
  /* */  _GCRY_ATTR_INTERNAL;

/* Unregister the pubkey identified by ID, which must have been
   registered with gcry_pk_register.  */
void gcry_pk_unregister (gcry_module_t module)
  /* */  _GCRY_ATTR_INTERNAL;

/* ********************** */

/* Type for the md_init function.  */
typedef void (*gcry_md_init_t) (void *c);

/* Type for the md_write function.  */
typedef void (*gcry_md_write_t) (void *c, const void *buf, size_t nbytes);

/* Type for the md_final function.  */
typedef void (*gcry_md_final_t) (void *c);

/* Type for the md_read function.  */
typedef unsigned char *(*gcry_md_read_t) (void *c);

typedef struct gcry_md_oid_spec
{
  const char *oidstring;
} gcry_md_oid_spec_t;

/* Module specification structure for message digests.  */
typedef struct gcry_md_spec
{
  const char *name;
  unsigned char *asnoid;
  int asnlen;
  gcry_md_oid_spec_t *oids;
  int mdlen;
  gcry_md_init_t init;
  gcry_md_write_t write;
  gcry_md_final_t final;
  gcry_md_read_t read;
  size_t contextsize; /* allocate this amount of context */
} gcry_md_spec_t;

/* Register a new digest module whose specification can be found in
   DIGEST.  On success, a new algorithm ID is stored in ALGORITHM_ID
   and a pointer representhing this module is stored in MODULE.  */
gcry_error_t gcry_md_register (gcry_md_spec_t *digest,
			       unsigned int *algorithm_id,
			       gcry_module_t *module)
  /* */  _GCRY_ATTR_INTERNAL;

/* Unregister the digest identified by ID, which must have been
   registered with gcry_digest_register.  */
void gcry_md_unregister (gcry_module_t module)
  /* */  _GCRY_ATTR_INTERNAL;

#if 0 /* keep Emacsens's auto-indent happy */
{
#endif
#ifdef __cplusplus
}
#endif
#endif

Upload File: