Debian Codegraph @

pkcs11/gkm/gkm-aes-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_AES_KEY_H__
22 #define __GKM_AES_KEY_H__
23
24 #include <glib-object.h>
25
26 #include "gkm-secret-key.h"
27 #include "gkm-types.h"
28
29 #include <gcrypt.h>
30
31 #define GKM_FACTORY_AES_KEY (gkm_aes_key_get_factory ())
32
33 #define GKM_TYPE_AES_KEY (gkm_aes_key_get_type ())
34 #define GKM_AES_KEY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GKM_TYPE_AES_KEY, GkmAesKey))
35 #define GKM_AES_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GKM_TYPE_AES_KEY, GkmAesKeyClass))
36 #define GKM_IS_AES_KEY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GKM_TYPE_AES_KEY))
37 #define GKM_IS_AES_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GKM_TYPE_AES_KEY))
38 #define GKM_AES_KEY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GKM_TYPE_AES_KEY, GkmAesKeyClass))
39
40 typedef struct _GkmAesKeyClass GkmAesKeyClass;
41 typedef struct _GkmAesKeyPrivate GkmAesKeyPrivate;
42
43 struct _GkmAesKeyClass {
44 GkmSecretKeyClass parent_class;
45 };
46
47 GType gkm_aes_key_get_type (void);
48
49 GkmFactory* gkm_aes_key_get_factory (void);
50
51 gsize gkm_aes_key_get_block_size (GkmAesKey *self);
52
53 gcry_cipher_hd_t gkm_aes_key_get_cipher (GkmAesKey *self,
54 int mode);
55
56 #endif /* __GKM_AES_KEY_H__ */