libpurple/ciphers/des.h

Fri, 14 Jun 2013 12:11:09 +0530

author
Ankit Vani <a@nevitus.org>
date
Fri, 14 Jun 2013 12:11:09 +0530
branch
soc.2013.gobjectification
changeset 34539
26e080fb06bb
parent 34537
fb40b0460a36
permissions
-rw-r--r--

GObjectified gchecksum.c as PurpleSHA1Cipher, PurpleSHA256Cipher and PurpleMD5Cipher

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

mercurial