Updated Czech translation
[platform/upstream/libsecret.git] / egg / egg-dh.h
1 /*
2  * gnome-keyring
3  *
4  * Copyright (C) 2009 Stefan Walter
5  * 
6  * This program 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.
10  *  
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *  
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., 51 Franklin Street, Fifth Floor, Boston,
19  * MA 02110-1301 USA
20  *
21  * Author: Stef Walter <stefw@thewalter.net>
22  */
23
24 #ifndef EGG_DH_H_
25 #define EGG_DH_H_
26
27 #include <glib.h>
28
29 #include <gcrypt.h>
30
31 gboolean   egg_dh_default_params                              (const gchar *name,
32                                                                gcry_mpi_t *prime,
33                                                                gcry_mpi_t *base);
34
35 gboolean   egg_dh_default_params_raw                          (const gchar *name,
36                                                                gconstpointer *prime,
37                                                                gsize *n_prime,
38                                                                gconstpointer *base,
39                                                                gsize *n_base);
40
41 gboolean   egg_dh_gen_pair                                    (gcry_mpi_t prime,
42                                                                gcry_mpi_t base,
43                                                                guint bits,
44                                                                gcry_mpi_t *pub,
45                                                                gcry_mpi_t *priv);
46
47 gpointer   egg_dh_gen_secret                                  (gcry_mpi_t peer,
48                                                                gcry_mpi_t priv,
49                                                                gcry_mpi_t prime,
50                                                                gsize *bytes);
51
52 #endif /* EGG_DH_H_ */