Thu, 13 Jun 2013 20:43:35 +0530
GObjectify RC4 cipher as PurpleRC4Cipher
| 10684 | 1 | /** |
| 15884 | 2 | * @file cipher.h Purple Cipher API |
| 10684 | 3 | * @ingroup core |
|
20889
3d0ef192f98c
All the links to libpurple signal pages were in the comment containing the
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
4 | * @see @ref cipher-signals |
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
5 | */ |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
6 | |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
7 | /* purple |
| 10684 | 8 | * |
| 15884 | 9 | * Purple is the legal property of its developers, whose names are too numerous |
| 10684 | 10 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 11 | * source distribution. | |
| 12 | * | |
| 13 | * This program is free software; you can redistribute it and/or modify | |
| 14 | * it under the terms of the GNU General Public License as published by | |
| 15 | * the Free Software Foundation; either version 2 of the License, or | |
| 16 | * (at your option) any later version. | |
| 17 | * | |
| 18 | * This program is distributed in the hope that it will be useful, | |
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 21 | * GNU General Public License for more details. | |
| 22 | * | |
| 23 | * You should have received a copy of the GNU General Public License | |
| 24 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18412
diff
changeset
|
25 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 10684 | 26 | */ |
| 15884 | 27 | #ifndef PURPLE_CIPHER_H |
| 28 | #define PURPLE_CIPHER_H | |
| 10684 | 29 | |
| 30 | #include <glib.h> | |
|
34536
38cc893bae51
GObjectify RC4 cipher as PurpleRC4Cipher
Ankit Vani <a@nevitus.org>
parents:
34535
diff
changeset
|
31 | #include <glib-object.h> |
|
31428
f392265bbe2d
included string.h in cipher.h since almost all of the ciphers use it.
Gary Kramlich <grim@reaperworld.com>
parents:
31421
diff
changeset
|
32 | #include <string.h> |
| 10684 | 33 | |
|
34536
38cc893bae51
GObjectify RC4 cipher as PurpleRC4Cipher
Ankit Vani <a@nevitus.org>
parents:
34535
diff
changeset
|
34 | #include "internal.h" |
| 10684 | 35 | |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
36 | #define PURPLE_TYPE_CIPHER (purple_cipher_get_type()) |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
37 | #define PURPLE_CIPHER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_CIPHER, PurpleCipher)) |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
38 | #define PURPLE_CIPHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_CIPHER, PurpleCipherClass)) |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
39 | #define PURPLE_IS_CIPHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_CIPHER)) |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
40 | #define PURPLE_IS_CIPHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_CIPHER)) |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
41 | #define PURPLE_CIPHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_CIPHER, PurpleCipherClass)) |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
42 | |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
43 | typedef struct _PurpleCipher PurpleCipher; |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
44 | typedef struct _PurpleCipherClass PurpleCipherClass; |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
45 | |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
46 | #define PURPLE_TYPE_CIPHER_BATCH_MODE (purple_cipher_batch_mode_get_type()) |
| 10684 | 47 | |
|
22024
3fd5e4fff1be
Triple DES cipher support from Elliott Sales de Andrade
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
20889
diff
changeset
|
48 | /** |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
49 | * PurpleCipherBatchMode: |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
50 | * @PURPLE_CIPHER_BATCH_MODE_ECB: Electronic Codebook Mode |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
51 | * @PURPLE_CIPHER_BATCH_MODE_CBC: Cipher Block Chaining Mode |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
52 | * |
|
22024
3fd5e4fff1be
Triple DES cipher support from Elliott Sales de Andrade
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
20889
diff
changeset
|
53 | * Modes for batch encrypters |
|
3fd5e4fff1be
Triple DES cipher support from Elliott Sales de Andrade
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
20889
diff
changeset
|
54 | */ |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
55 | typedef enum { |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
56 | PURPLE_CIPHER_BATCH_MODE_ECB, /*< nick=ECB Batch Mode >*/ |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
57 | PURPLE_CIPHER_BATCH_MODE_CBC /*< nick=CBC Batch Mode >*/ |
|
22024
3fd5e4fff1be
Triple DES cipher support from Elliott Sales de Andrade
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
20889
diff
changeset
|
58 | } PurpleCipherBatchMode; |
| 10684 | 59 | |
| 60 | /** | |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
61 | * PurpleCipher: |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
62 | * |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
63 | * Purple Cipher is an opaque data structure and should not be used directly. |
| 10684 | 64 | */ |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
65 | struct _PurpleCipher { |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
66 | /*< private >*/ |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
67 | GObject gparent; |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
68 | |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
69 | void (*_purple_reserved1)(void); |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
70 | void (*_purple_reserved2)(void); |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
71 | void (*_purple_reserved3)(void); |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
72 | void (*_purple_reserved4)(void); |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
73 | }; |
| 10684 | 74 | |
| 75 | /** | |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
76 | * PurpleCipherClass: |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
77 | * |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
78 | * The base class for all #PurpleCipher's. |
| 10684 | 79 | */ |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
80 | struct _PurpleCipherClass { |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
81 | /*< private >*/ |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
82 | GObjectClass parent_class; |
| 10684 | 83 | |
| 84 | /** The reset function */ | |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
85 | void (*reset)(PurpleCipher *cipher); |
| 10684 | 86 | |
|
34535
f8fd1c60c22a
Merged PurpleCipher structure with the one in default branch
Ankit Vani <a@nevitus.org>
parents:
34533
diff
changeset
|
87 | /** The reset state function */ |
|
f8fd1c60c22a
Merged PurpleCipher structure with the one in default branch
Ankit Vani <a@nevitus.org>
parents:
34533
diff
changeset
|
88 | void (*reset_state)(PurpleCipher *cipher); |
|
f8fd1c60c22a
Merged PurpleCipher structure with the one in default branch
Ankit Vani <a@nevitus.org>
parents:
34533
diff
changeset
|
89 | |
| 10684 | 90 | /** The set initialization vector function */ |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
91 | void (*set_iv)(PurpleCipher *cipher, guchar *iv, size_t len); |
| 10684 | 92 | |
| 93 | /** The append data function */ | |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
94 | void (*append)(PurpleCipher *cipher, const guchar *data, size_t len); |
| 10684 | 95 | |
| 96 | /** The digest function */ | |
|
34535
f8fd1c60c22a
Merged PurpleCipher structure with the one in default branch
Ankit Vani <a@nevitus.org>
parents:
34533
diff
changeset
|
97 | gboolean (*digest)(PurpleCipher *cipher, guchar digest[], size_t len); |
|
f8fd1c60c22a
Merged PurpleCipher structure with the one in default branch
Ankit Vani <a@nevitus.org>
parents:
34533
diff
changeset
|
98 | |
|
f8fd1c60c22a
Merged PurpleCipher structure with the one in default branch
Ankit Vani <a@nevitus.org>
parents:
34533
diff
changeset
|
99 | /** The get digest size function */ |
|
f8fd1c60c22a
Merged PurpleCipher structure with the one in default branch
Ankit Vani <a@nevitus.org>
parents:
34533
diff
changeset
|
100 | size_t (*get_digest_size)(PurpleCipher *cipher); |
| 10684 | 101 | |
| 102 | /** The encrypt function */ | |
|
34535
f8fd1c60c22a
Merged PurpleCipher structure with the one in default branch
Ankit Vani <a@nevitus.org>
parents:
34533
diff
changeset
|
103 | ssize_t (*encrypt)(PurpleCipher *cipher, const guchar input[], size_t in_len, guchar output[], size_t out_size); |
| 10684 | 104 | |
| 105 | /** The decrypt function */ | |
|
34535
f8fd1c60c22a
Merged PurpleCipher structure with the one in default branch
Ankit Vani <a@nevitus.org>
parents:
34533
diff
changeset
|
106 | ssize_t (*decrypt)(PurpleCipher *cipher, const guchar input[], size_t in_len, guchar output[], size_t out_size); |
| 10684 | 107 | |
| 108 | /** The set salt function */ | |
|
34535
f8fd1c60c22a
Merged PurpleCipher structure with the one in default branch
Ankit Vani <a@nevitus.org>
parents:
34533
diff
changeset
|
109 | void (*set_salt)(PurpleCipher *cipher, const guchar *salt, size_t len); |
| 10684 | 110 | |
| 111 | /** The get salt size function */ | |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
112 | size_t (*get_salt_size)(PurpleCipher *cipher); |
| 10684 | 113 | |
| 114 | /** The set key function */ | |
|
34535
f8fd1c60c22a
Merged PurpleCipher structure with the one in default branch
Ankit Vani <a@nevitus.org>
parents:
34533
diff
changeset
|
115 | void (*set_key)(PurpleCipher *cipher, const guchar *key, size_t len); |
|
16743
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
116 | |
|
33910
5749f2724b12
ciphers cleanup: get key size
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33909
diff
changeset
|
117 | /** The get key size function */ |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
118 | size_t (*get_key_size)(PurpleCipher *cipher); |
|
33910
5749f2724b12
ciphers cleanup: get key size
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33909
diff
changeset
|
119 | |
|
22024
3fd5e4fff1be
Triple DES cipher support from Elliott Sales de Andrade
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
20889
diff
changeset
|
120 | /** The set batch mode function */ |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
121 | void (*set_batch_mode)(PurpleCipher *cipher, PurpleCipherBatchMode mode); |
|
22024
3fd5e4fff1be
Triple DES cipher support from Elliott Sales de Andrade
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
20889
diff
changeset
|
122 | |
|
3fd5e4fff1be
Triple DES cipher support from Elliott Sales de Andrade
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
20889
diff
changeset
|
123 | /** The get batch mode function */ |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
124 | PurpleCipherBatchMode (*get_batch_mode)(PurpleCipher *cipher); |
|
22024
3fd5e4fff1be
Triple DES cipher support from Elliott Sales de Andrade
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
20889
diff
changeset
|
125 | |
|
22025
23756775175d
HMAC digest support from Elliott Sales de Andrade
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22024
diff
changeset
|
126 | /** The get block size function */ |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
127 | size_t (*get_block_size)(PurpleCipher *cipher); |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
128 | |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
129 | /** The get cipher name function */ |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
130 | const gchar* (*get_name)(PurpleCipher *cipher); |
|
22025
23756775175d
HMAC digest support from Elliott Sales de Andrade
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22024
diff
changeset
|
131 | |
|
33908
78b42fd69e02
ciphers cleanup: passing keys with length by default
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32206
diff
changeset
|
132 | void (*_purple_reserved1)(void); |
|
78b42fd69e02
ciphers cleanup: passing keys with length by default
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32206
diff
changeset
|
133 | void (*_purple_reserved2)(void); |
|
78b42fd69e02
ciphers cleanup: passing keys with length by default
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32206
diff
changeset
|
134 | void (*_purple_reserved3)(void); |
|
78b42fd69e02
ciphers cleanup: passing keys with length by default
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32206
diff
changeset
|
135 | void (*_purple_reserved4)(void); |
| 10684 | 136 | }; |
| 137 | ||
|
31421
713fb035d563
Created a new branch to break the ciphers out to their own files. Also I've now exposed purple_g_checksum_* if we're on glib >= 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
25888
diff
changeset
|
138 | G_BEGIN_DECLS |
| 10684 | 139 | |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
140 | GType purple_cipher_get_type(void); |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
141 | GType purple_cipher_batch_mode_get_type(void); |
| 10684 | 142 | |
| 15884 | 143 | const gchar *purple_cipher_get_name(PurpleCipher *cipher); |
| 10684 | 144 | |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
145 | void purple_cipher_reset(PurpleCipher *cipher); |
|
34535
f8fd1c60c22a
Merged PurpleCipher structure with the one in default branch
Ankit Vani <a@nevitus.org>
parents:
34533
diff
changeset
|
146 | void purple_cipher_reset_state(PurpleCipher *cipher); |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
147 | void purple_cipher_set_iv(PurpleCipher *cipher, guchar *iv, size_t len); |
| 10684 | 148 | |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
149 | void purple_cipher_append(PurpleCipher *cipher, const guchar *data, size_t len); |
|
34535
f8fd1c60c22a
Merged PurpleCipher structure with the one in default branch
Ankit Vani <a@nevitus.org>
parents:
34533
diff
changeset
|
150 | gboolean purple_cipher_digest(PurpleCipher *cipher, guchar digest[], size_t len); |
|
f8fd1c60c22a
Merged PurpleCipher structure with the one in default branch
Ankit Vani <a@nevitus.org>
parents:
34533
diff
changeset
|
151 | gboolean purple_cipher_digest_to_str(PurpleCipher *cipher, gchar digest_s[], size_t len); |
|
f8fd1c60c22a
Merged PurpleCipher structure with the one in default branch
Ankit Vani <a@nevitus.org>
parents:
34533
diff
changeset
|
152 | size_t purple_cipher_get_digest_size(PurpleCipher *cipher); |
| 10684 | 153 | |
|
34535
f8fd1c60c22a
Merged PurpleCipher structure with the one in default branch
Ankit Vani <a@nevitus.org>
parents:
34533
diff
changeset
|
154 | ssize_t purple_cipher_encrypt(PurpleCipher *cipher, const guchar input[], size_t in_len, guchar output[], size_t out_size); |
|
f8fd1c60c22a
Merged PurpleCipher structure with the one in default branch
Ankit Vani <a@nevitus.org>
parents:
34533
diff
changeset
|
155 | ssize_t purple_cipher_decrypt(PurpleCipher *cipher, const guchar input[], size_t in_len, guchar output[], size_t out_size); |
| 10684 | 156 | |
|
34535
f8fd1c60c22a
Merged PurpleCipher structure with the one in default branch
Ankit Vani <a@nevitus.org>
parents:
34533
diff
changeset
|
157 | void purple_cipher_set_salt(PurpleCipher *cipher, const guchar *salt, size_t len); |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
158 | size_t purple_cipher_get_salt_size(PurpleCipher *cipher); |
|
33910
5749f2724b12
ciphers cleanup: get key size
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33909
diff
changeset
|
159 | |
|
34535
f8fd1c60c22a
Merged PurpleCipher structure with the one in default branch
Ankit Vani <a@nevitus.org>
parents:
34533
diff
changeset
|
160 | void purple_cipher_set_key(PurpleCipher *cipher, const guchar *key, size_t len); |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
161 | size_t purple_cipher_get_key_size(PurpleCipher *cipher); |
| 10684 | 162 | |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
163 | void purple_cipher_set_batch_mode(PurpleCipher *cipher, PurpleCipherBatchMode mode); |
|
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
164 | PurpleCipherBatchMode purple_cipher_get_batch_mode(PurpleCipher *cipher); |
|
12382
5ef67596b420
[gaim-migrate @ 14688]
Richard Laager <rlaager@pidgin.im>
parents:
12323
diff
changeset
|
165 | |
|
34533
74b179b1e8ef
GObjectify the PurpleCipher structure
Ankit Vani <a@nevitus.org>
parents:
33915
diff
changeset
|
166 | size_t purple_cipher_get_block_size(PurpleCipher *cipher); |
|
31421
713fb035d563
Created a new branch to break the ciphers out to their own files. Also I've now exposed purple_g_checksum_* if we're on glib >= 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
25888
diff
changeset
|
167 | |
|
713fb035d563
Created a new branch to break the ciphers out to their own files. Also I've now exposed purple_g_checksum_* if we're on glib >= 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
25888
diff
changeset
|
168 | G_END_DECLS |
| 10684 | 169 | |
| 15884 | 170 | #endif /* PURPLE_CIPHER_H */ |