libpurple/ciphers/descipher.h

changeset 38415
53dfd90c9b61
parent 38369
3200c5f09dbc
parent 38414
3892b306732f
child 38416
576284485927
equal deleted inserted replaced
38369:3200c5f09dbc 38415:53dfd90c9b61
1 /* purple
2 *
3 * Purple is the legal property of its developers, whose names are too numerous
4 * to list here. Please refer to the COPYRIGHT file distributed with this
5 * source distribution.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22 #ifndef PURPLE_DES_CIPHER_H
23 #define PURPLE_DES_CIPHER_H
24 /**
25 * SECTION:descipher
26 * @section_id: libpurple-descipher
27 * @short_description: <filename>ciphers/descipher.h</filename>
28 * @title: DES Cipher
29 */
30
31 #include "cipher.h"
32
33 #define PURPLE_TYPE_DES_CIPHER (purple_des_cipher_get_type())
34 #define PURPLE_DES_CIPHER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_DES_CIPHER, PurpleDESCipher))
35 #define PURPLE_DES_CIPHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_DES_CIPHER, PurpleDESCipherClass))
36 #define PURPLE_IS_DES_CIPHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_DES_CIPHER))
37 #define PURPLE_IS_DES_CIPHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((obj), PURPLE_TYPE_DES_CIPHER))
38 #define PURPLE_DES_CIPHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_DES_CIPHER, PurpleDESCipherClass))
39
40 typedef struct _PurpleDESCipher PurpleDESCipher;
41 typedef struct _PurpleDESCipherClass PurpleDESCipherClass;
42
43 struct _PurpleDESCipher {
44 PurpleCipher gparent;
45 };
46
47 struct _PurpleDESCipherClass {
48 PurpleCipherClass gparent;
49
50 /*< private >*/
51 void (*_purple_reserved1)(void);
52 void (*_purple_reserved2)(void);
53 void (*_purple_reserved3)(void);
54 void (*_purple_reserved4)(void);
55 };
56
57 G_BEGIN_DECLS
58
59 GType purple_des_cipher_get_type(void);
60
61 PurpleCipher *purple_des_cipher_new(void);
62
63 int purple_des_cipher_ecb_crypt(PurpleDESCipher *des_cipher, const guint8 * from, guint8 * to, int mode);
64
65 G_END_DECLS
66
67 #endif /* PURPLE_DES_CIPHER_H */

mercurial