Debian Codegraph @

pkcs11/gkm/gkm-dh-key.h

raw
1 /*
2 * gnome-keyring
3 *
4 * Copyright (C) 2008 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, see
18 * <http://www.gnu.org/licenses/>.
19 */
20
21 #ifndef __GKM_DH_KEY_H__
22 #define __GKM_DH_KEY_H__
23
24 #include <glib-object.h>
25
26 #include "gkm-object.h"
27 #include "gkm-types.h"
28
29 #define GKM_TYPE_DH_KEY (gkm_dh_key_get_type ())
30 #define GKM_DH_KEY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GKM_TYPE_DH_KEY, GkmDhKey))
31 #define GKM_DH_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GKM_TYPE_DH_KEY, GkmDhKeyClass))
32 #define GKM_IS_DH_KEY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GKM_TYPE_DH_KEY))
33 #define GKM_IS_DH_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GKM_TYPE_DH_KEY))
34 #define GKM_DH_KEY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GKM_TYPE_DH_KEY, GkmDhKeyClass))
35
36 typedef struct _GkmDhKeyClass GkmDhKeyClass;
37 typedef struct _GkmDhKeyPrivate GkmDhKeyPrivate;
38
39 struct _GkmDhKey {
40 GkmObject parent;
41 GkmDhKeyPrivate *pv;
42 };
43
44 struct _GkmDhKeyClass {
45 GkmObjectClass parent_class;
46 };
47
48 GType gkm_dh_key_get_type (void);
49
50 void gkm_dh_key_initialize (GkmDhKey *self,
51 gcry_mpi_t prime,
52 gcry_mpi_t base,
53 gpointer id,
54 gsize n_id);
55
56 gcry_mpi_t gkm_dh_key_get_prime (GkmDhKey *self);
57
58 #endif /* __GKM_DH_KEY_H__ */