Upstream sync.
[shishi.git] / crypto / cipher / dynload.h
blob0636948d18ce4cdd9938f0ac514db29b3ed81ce5
1 /* dynload.h
2 * Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
4 * This file is part of Libgcrypt.
6 * Libgcrypt is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser general Public License as
8 * published by the Free Software Foundation; either version 2.1 of
9 * the License, or (at your option) any later version.
11 * Libgcrypt is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
20 #ifndef G10_CIPHER_DYNLOAD_H
21 #define G10_CIPHER_DYNLOAD_H
23 #include "mpi.h"
26 void _gcry_register_internal_cipher_extension( const char *module_id,
27 void * (*enumfunc)(int, int*, int*, int*) );
29 int
30 _gcry_enum_gnupgext_digests( void **enum_context,
31 int *algo,
32 const char *(**r_get_info)( int, size_t*,byte**, int*, int*,
33 void (**)(void*),
34 void (**)(void*,byte*,size_t),
35 void (**)(void*),byte *(**)(void*)) );
37 const char *
38 _gcry_enum_gnupgext_ciphers( void **enum_context, int *algo,
39 size_t *keylen, size_t *blocksize, size_t *contextsize,
40 int (**setkeyf)( void *c, byte *key, unsigned keylen ),
41 void (**encryptf)( void *c, byte *outbuf, byte *inbuf ),
42 void (**decryptf)( void *c, byte *outbuf, byte *inbuf )
46 const char *
47 _gcry_enum_gnupgext_pubkeys( void **enum_context, int *algo,
48 int *npkey, int *nskey, int *nenc, int *nsig, int *use,
49 int (**generate)( int algo, unsigned int nbits, unsigned long use_e,
50 MPI *skey, MPI **retfactors ),
51 int (**check_secret_key)( int algo, MPI *skey ),
52 int (**encryptf)( int algo, MPI *resarr, MPI data, MPI *pkey, int flags ),
53 int (**decryptf)( int algo, MPI *result, MPI *data, MPI *skey, int flags ),
54 int (**sign)( int algo, MPI *resarr, MPI data, MPI *skey ),
55 int (**verify)( int algo, MPI hash, MPI *data, MPI *pkey,
56 int (*cmp)(void *, MPI), void *opaquev ),
57 unsigned (**get_nbits)( int algo, MPI *pkey ) );
60 int (*_gcry_dynload_getfnc_gather_random(void))( void (*)(const void*, size_t, int),
61 int, size_t, int);
62 void (*_gcry_dynload_getfnc_fast_random_poll(void)
63 )( void (*)(const void*, size_t, int), int );
66 /** This function is in construct.c **/
67 void _gcry_cipher_modules_constructor(void);
69 #endif /*G10_CIPHER_DYNLOAD_H*/