Debian Codegraph @

pkcs11/gkm/gkm-data-asn1.h

raw
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /* gkm-data-asn1.h - ASN.1 helper routines
3
4 Copyright (C) 2007 Stefan Walter
5
6 The Gnome Keyring Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public License as
8 published by the Free Software Foundation; either version 2 of the
9 License, or (at your option) any later version.
10
11 The Gnome Keyring Library 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 GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public
17 License along with the Gnome Library; see the file COPYING.LIB. If not,
18 <http://www.gnu.org/licenses/>.
19
20 Author: Stef Walter <[email protected]>
21 */
22
23 #ifndef GKM_DATA_ASN_H_
24 #define GKM_DATA_ASN_H_
25
26 #include <glib.h>
27 #include <gcrypt.h>
28
29 gboolean gkm_data_asn1_read_mpi (GNode *asn,
30 gcry_mpi_t *mpi);
31
32 gboolean gkm_data_asn1_write_mpi (GNode *asn,
33 gcry_mpi_t mpi);
34
35 gboolean gkm_data_asn1_read_string_mpi (GNode *asn,
36 gcry_mpi_t *mpi);
37
38 gboolean gkm_data_asn1_write_string_mpi (GNode *asn,
39 gcry_mpi_t mpi);
40
41 gboolean gkm_data_asn1_read_string (GNode *asn,
42 GBytes **data);
43
44 gboolean gkm_data_asn1_write_string (GNode *asn,
45 GBytes *data);
46
47 gboolean gkm_data_asn1_read_bit_string (GNode *asn,
48 GBytes **data,
49 gsize *data_bits);
50
51 gboolean gkm_data_asn1_write_bit_string (GNode *asn,
52 GBytes *data,
53 gsize data_bits);
54
55 gboolean gkm_data_asn1_read_oid (GNode *asn,
56 GQuark *oid);
57
58 gboolean gkm_data_asn1_write_oid (GNode *asn,
59 GQuark oid);
60
61 #endif /*GKM_DATA_ASN_H_*/