We no longer support UCD SNMP - and *do* support Net-SNMP, and have
[metze/wireshark/wip.git] / airpcap_loader.h
1 /* airpcap_loader.h
2  * Declarations of routines for the "About" dialog
3  *
4  * $Id$
5  *
6  * Giorgio Tino <giorgio.tino@cacetech.com>
7  * Copyright (c) CACE Technologies, LLC 2006
8  *
9  * Wireshark - Network traffic analyzer
10  * By Gerald Combs <gerald@wireshark.org>
11  * Copyright 1998 Gerald Combs
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (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
25  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
26  */
27
28 #ifndef __AIRPCAP_LOADER_H__
29 #define __AIRPCAP_LOADER_H__
30
31 /* Error values from "get_airpcap_interface_list()". */
32 #define CANT_GET_AIRPCAP_INTERFACE_LIST 0       /* error getting list */
33 #define NO_AIRPCAP_INTERFACES_FOUND     1       /* list is empty */
34
35 #define AIRPCAP_CHANNEL_ANY_NAME "ANY"
36
37 /*
38  * WEP_KEY_MAX_SIZE is in bytes, but each byte is rapresented in strings with an ascii char
39  * 4 bit are needed to store an exadecimal number, 8 bit to store a char...
40  */
41 #define WEP_KEY_MAX_CHAR_SIZE (WEP_KEY_MAX_SIZE*2)
42
43 /*
44  * WEP_KEY_MAX_SIZE is in bytes, this is in bits...
45  */
46 #define WEP_KEY_MAX_BIT_SIZE (WEP_KEY_MAX_SIZE*8)
47
48 #define WEP_KEY_MIN_CHAR_SIZE 2
49 #define WEP_KEY_MIN_BIT_SIZE  8
50
51 /*
52  * XXX - The next #define should probably be moved in airpcap.h,
53  * near WEP_KEY_MAX_SIZE ...
54  */
55 #define WPA_KEY_MAX_SIZE 63 /* 63 chars followed by a '\0' */
56
57 #define WPA_KEY_MAX_CHAR_SIZE (WPA_KEY_MAX_SIZE*1)
58 #define WPA_KEY_MAX_BIT_SIZE  (WPA_KEY_MAX_SIZE*8)
59 #define WPA_KEY_MIN_CHAR_SIZE 8
60 #define WPA_KEY_MIN_BIT_SIZE  (WPA_KEY_MIN_CHAR_SIZE*8)
61
62 /*
63  * XXX - The next #define should probably be moved in airpcap.h,
64  * near WEP_KEY_MAX_SIZE ...
65  */
66 #define WPA_SSID_MAX_SIZE 32
67
68 #define WPA_SSID_MAX_CHAR_SIZE (WPA_SSID_MAX_SIZE*1)
69 #define WPA_SSID_MAX_BIT_SIZE  (WPA_SSID_MAX_SIZE*8)
70 #define WPA_SSID_MIN_CHAR_SIZE 0
71 #define WPA_SSID_MIN_BIT_SIZE  (WPA_SSID_MIN_CHAR_SIZE*8)
72
73 /*
74  * User can enter the binary PSK, instead of the passphrase+ssid...
75  */
76 #define WPA_PSK_KEY_SIZE 32 /* Fixed size, 32 bytes (256bit) */
77 #define WPA_PSK_KEY_CHAR_SIZE (WPA_PSK_KEY_SIZE*2)
78 #define WPA_PSK_KEY_BIT_SIZE  (WPA_PSK_KEY_SIZE*8)
79
80 #define AIRPCAP_WEP_KEY_STRING  "WEP"
81 /*
82  * XXX - WPA_PWD is the passphrase+ssid and WPA-PSK is the hexadecimal key 
83  */
84 #define AIRPCAP_WPA_PWD_KEY_STRING  "WPA-PWD"
85 #define AIRPCAP_WPA_BIN_KEY_STRING  "WPA-PSK"
86
87 /*
88  * Key string defines
89  */
90 #define STRING_KEY_TYPE_WEP "wep"
91 #define STRING_KEY_TYPE_WPA_PWD "wpa-pwd"
92 #define STRING_KEY_TYPE_WPA_PSK "wpa-psk"
93
94 #define AIRPCAP_DLL_OK                  0
95 #define AIRPCAP_DLL_OLD                 1
96 #define AIRPCAP_DLL_ERROR               2
97 #define AIRPCAP_DLL_NOT_FOUND   3
98
99 typedef PCHAR (*AirpcapGetLastErrorHandler)(PAirpcapHandle AdapterHandle);
100 typedef BOOL (*AirpcapGetDeviceListHandler)(PAirpcapDeviceDescription *PPAllDevs, PCHAR Ebuf);
101 typedef VOID (*AirpcapFreeDeviceListHandler)(PAirpcapDeviceDescription PAllDevs);
102 typedef PAirpcapHandle (*AirpcapOpenHandler)(PCHAR DeviceName, PCHAR Ebuf);
103 typedef VOID (*AirpcapCloseHandler)(PAirpcapHandle AdapterHandle);
104 typedef BOOL (*AirpcapGetLinkTypeHandler)(PAirpcapHandle AdapterHandle, PAirpcapLinkType PLinkType);
105 typedef BOOL (*AirpcapSetLinkTypeHandler)(PAirpcapHandle AdapterHandle, AirpcapLinkType NewLinkType);
106 typedef BOOL (*AirpcapSetKernelBufferHandler)(PAirpcapHandle AdapterHandle, UINT BufferSize);
107 typedef BOOL (*AirpcapSetFilterHandler)(PAirpcapHandle AdapterHandle, PVOID Instructions, UINT Len);
108 typedef BOOL (*AirpcapGetMacAddressHandler)(PAirpcapHandle AdapterHandle, PAirpcapMacAddress PMacAddress);
109 typedef BOOL (*AirpcapSetMinToCopyHandler)(PAirpcapHandle AdapterHandle, UINT MinToCopy);
110 typedef BOOL (*AirpcapGetReadEventHandler)(PAirpcapHandle AdapterHandle, HANDLE* PReadEvent);
111 typedef BOOL (*AirpcapReadHandler)(PAirpcapHandle AdapterHandle, PBYTE Buffer, UINT BufSize, PUINT PReceievedBytes);
112 typedef BOOL (*AirpcapGetStatsHandler)(PAirpcapHandle AdapterHandle, PAirpcapStats PStats);
113 typedef BOOL (*AirpcapTurnLedOnHandler)(PAirpcapHandle  AdapterHandle, UINT  LedNumber);
114 typedef BOOL (*AirpcapTurnLedOffHandler)(PAirpcapHandle  AdapterHandle, UINT  LedNumber);
115 typedef BOOL (*AirpcapSetDeviceChannelHandler)(PAirpcapHandle  AdapterHandle, UINT  Channel);
116 typedef BOOL (*AirpcapGetDeviceChannelHandler)(PAirpcapHandle  AdapterHandle, PUINT PChannel);
117 typedef BOOL (*AirpcapSetFcsPresenceHandler)(PAirpcapHandle  AdapterHandle, BOOL  IsFcsPresent);
118 typedef BOOL (*AirpcapGetFcsPresenceHandler)(PAirpcapHandle  AdapterHandle, PBOOL PIsFcsPresent);
119 typedef BOOL (*AirpcapSetFcsValidationHandler)(PAirpcapHandle  AdapterHandle, AirpcapValidationType ValidationType);
120 typedef BOOL (*AirpcapGetFcsValidationHandler)(PAirpcapHandle  AdapterHandle, PAirpcapValidationType PValidationType);
121 typedef BOOL (*AirpcapSetDeviceKeysHandler)(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection);
122 typedef BOOL (*AirpcapGetDeviceKeysHandler)(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, PUINT PKeysCollectionSize);
123 typedef BOOL (*AirpcapSetDriverKeysHandler)(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection);
124 typedef BOOL (*AirpcapGetDriverKeysHandler)(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, PUINT PKeysCollectionSize);
125 typedef BOOL (*AirpcapSetDecryptionStateHandler)(PAirpcapHandle AdapterHandle, AirpcapDecryptionState Enable);
126 typedef BOOL (*AirpcapGetDecryptionStateHandler)(PAirpcapHandle AdapterHandle, PAirpcapDecryptionState PEnable);
127 typedef BOOL (*AirpcapSetDriverDecryptionStateHandler)(PAirpcapHandle AdapterHandle, AirpcapDecryptionState Enable);
128 typedef BOOL (*AirpcapGetDriverDecryptionStateHandler)(PAirpcapHandle AdapterHandle, PAirpcapDecryptionState PEnable);
129 typedef BOOL (*AirpcapStoreCurConfigAsAdapterDefaultHandler)(PAirpcapHandle AdapterHandle);
130 typedef VOID (*AirpcapGetVersionHandler)(PUINT VersionMajor, PUINT VersionMinor, PUINT VersionRev, PUINT VersionBuild);
131
132 /*
133  * The list of interfaces returned by "get_airpcap_interface_list()" is
134  * a list of these structures.
135  */
136 typedef struct {
137         char                                    *name;                          /* e.g. "eth0" */
138         char                                    *description;           /* from OS, e.g. "Local Area Connection" or NULL */
139         GSList                                  *ip_addr;                       /* containing address values of if_addr_t */
140         gboolean                                loopback;                       /* TRUE if loopback, FALSE otherwise */
141         AirpcapLinkType                 linkType;                       /* The link layer type*/
142         UINT                                    channel;                        /* Channel (1-14)*/
143         BOOL                                    IsFcsPresent;           /* Include 802.11 CRC in frames */
144         AirpcapValidationType   CrcValidationOn;        /* Capture Frames with Wrong CRC */
145         AirpcapDecryptionState  DecryptionOn;           /* TRUE if decryption is on, FALSE otherwise*/
146         PAirpcapKeysCollection  keysCollection;         /* WEP Key collection for the adapter */
147         UINT                                    keysCollectionSize;     /* Size of the key collection */
148         gboolean                                blinking;                       /* TRUE if is blinkng, FALSE otherwise*/
149         gboolean                                led;                            /* TRUE if on, FALSE if off*/
150         gboolean                                saved;                          /* TRUE if current configuration has been saved, FALSE otherwise */
151         gint                                    tag;                            /* int for the gtk blinking callback */
152 } airpcap_if_info_t;
153
154 /*
155  * Struct to store infos about a specific decryption key.
156  */
157 typedef struct {
158     GString *key;
159     GString *ssid;
160     guint   bits;
161     guint   type;
162 } decryption_key_t;
163
164 /*
165  * Struct used to store infos to pass to the preferences manager callbacks
166  */
167 typedef struct {
168    GList *list;
169    int current_index;
170    int number_of_keys;
171 } keys_cb_data_t;
172
173 /* Airpcap interface list */
174 extern GList *airpcap_if_list;
175
176 /* Airpcap current selected interface */
177 extern airpcap_if_info_t *airpcap_if_selected;
178
179 /* Airpcap current active interface */
180 extern airpcap_if_info_t *airpcap_if_active;
181
182 /* WLAN preferences pointer */
183 //extern module_t *wlan_prefs;
184
185 /*
186  * Function used to read the Decryption Keys from the preferences and store them
187  * properly into the airpcap adapter.
188  */
189 BOOL
190 load_wlan_driver_wep_keys();
191
192 /*
193  *  Function used to save to the prefereces file the Decryption Keys.
194  */
195 BOOL
196 save_wlan_wep_keys(airpcap_if_info_t* info_if);
197
198 /*
199  * This function will tell the airpcap driver the key list to use
200  * This will be stored into the registry...
201  */
202 gboolean
203 write_wlan_wep_keys_to_regitry(airpcap_if_info_t* info_if, GList* key_list);
204
205 /* Returs TRUE if the WEP key is valid, false otherwise */
206 gboolean
207 wep_key_is_valid(char* key);
208
209 /*
210  * Callback used to free an instance of airpcap_if_info_t
211  */
212 static void
213 free_airpcap_if_cb(gpointer data, gpointer user_data _U_);
214
215 /*
216  * USED FOR DEBUG ONLY... PRINTS AN AirPcap ADAPTER STRUCTURE in a fancy way.
217  */
218 void
219 airpcap_if_info_print(airpcap_if_info_t* if_info);
220
221 /*
222  * Used to retrieve the two chars string from interface
223  */
224 gchar*
225 airpcap_get_if_string_number_from_description(gchar* description);
226
227 /*
228  * Function used to free the airpcap interface list
229  */
230 void
231 free_airpcap_interface_list(GList *if_list);
232
233 /*
234  * Used to retrieve the interface given the name
235  * (the name is used in AirpcapOpen)
236  */
237 airpcap_if_info_t* get_airpcap_if_by_name(GList* if_list, const gchar* name);
238
239 /*
240  * Airpcap wrapper, used to store the current settings for the selected adapter
241  */
242 BOOL
243 airpcap_if_store_cur_config_as_adapter_default(PAirpcapHandle ah);
244
245 /*
246  * Function used to load the WEP keys for a selected interface
247  */
248 BOOL
249 airpcap_if_load_keys(PAirpcapHandle ad, airpcap_if_info_t *if_info);
250
251 /*
252  * Function used to load the WEP keys from the global driver list
253  */
254 BOOL
255 airpcap_if_load_driver_keys(PAirpcapHandle ad, airpcap_if_info_t *if_info);
256
257 /*
258  * Function used to save the WEP keys for a selected interface
259  */
260 void
261 airpcap_if_save_keys(PAirpcapHandle ad, airpcap_if_info_t *if_info);
262
263 /*
264  * Function used to save the WEP keys for a selected interface
265  */
266 void
267 airpcap_if_save_driver_keys(PAirpcapHandle ad, airpcap_if_info_t *if_info);
268
269 /*
270  * Airpcap wrapper, used to get the fcs validation of an airpcap adapter
271  */
272 BOOL
273 airpcap_if_get_fcs_validation(PAirpcapHandle ah, PAirpcapValidationType val);
274
275 /*
276  * Airpcap wrapper, used to set the fcs validation of an airpcap adapter
277  */
278 BOOL
279 airpcap_if_set_fcs_validation(PAirpcapHandle ah, AirpcapValidationType val);
280
281 /*
282  * Airpcap wrapper, used to get the decryption enabling of an airpcap adapter
283  */
284 BOOL
285 airpcap_if_get_decryption_state(PAirpcapHandle ah, PAirpcapDecryptionState val);
286
287 /*
288  * Airpcap wrapper, used to set the decryption enabling of an airpcap adapter
289  */
290 BOOL
291 airpcap_if_set_decryption_state(PAirpcapHandle ah, AirpcapDecryptionState val);
292
293 /*
294  * Airpcap wrapper, used to get the fcs presence of an airpcap adapter
295  */
296 BOOL
297 airpcap_if_get_fcs_presence(PAirpcapHandle ah, PBOOL ch);
298
299 /*
300  * Airpcap wrapper, used to set the fcs presence of an airpcap adapter
301  */
302 BOOL
303 airpcap_if_set_fcs_presence(PAirpcapHandle ah, BOOL ch);
304
305 /*
306  * Airpcap wrapper, used to get the link type of an airpcap adapter
307  */
308 BOOL
309 airpcap_if_get_link_type(PAirpcapHandle ah, PAirpcapLinkType lt);
310
311 /*
312  * Airpcap wrapper, used to set the link type of an airpcap adapter
313  */
314 BOOL
315 airpcap_if_set_link_type(PAirpcapHandle ah, AirpcapLinkType lt);
316
317 /*
318  * Airpcap wrapper, used to get the channel of an airpcap adapter
319  */
320 BOOL
321 airpcap_if_get_device_channel(PAirpcapHandle ah, PUINT ch);
322
323 /*
324  * Airpcap wrapper, used to set the channel of an airpcap adapter
325  */
326 BOOL
327 airpcap_if_set_device_channel(PAirpcapHandle ah, UINT ch);
328
329 /*
330  * Airpcap wrapper, used to open an airpcap adapter
331  */
332 PAirpcapHandle airpcap_if_open(PCHAR name, PCHAR err);
333
334 /*
335  * Airpcap wrapper, used to close an airpcap adapter
336  */
337 VOID airpcap_if_close(PAirpcapHandle handle);
338
339 /*
340  * Airpcap wrapper, used to turn on the led of an airpcap adapter
341  */
342 BOOL airpcap_if_turn_led_on(PAirpcapHandle AdapterHandle, UINT LedNumber);
343
344 /*
345  * Airpcap wrapper, used to turn off the led of an airpcap adapter
346  */
347 BOOL airpcap_if_turn_led_off(PAirpcapHandle AdapterHandle, UINT LedNumber);
348
349 /*
350  * This function will create a new airpcap_if_info_t using a name and a description
351  */
352 airpcap_if_info_t* airpcap_if_info_new(char *name, char *description);
353
354 /*
355  * This function will create a new fake drivers' interface, to load global keys...
356  */
357 airpcap_if_info_t* airpcap_driver_fake_if_info_new();
358
359 /*
360  *  Used to dinamically load the airpcap library in order link it only when
361  *  it's present on the system.
362  */
363 int load_airpcap(void);
364
365 /*
366  * Get an error message string for a CANT_GET_INTERFACE_LIST error from
367  * "get_airpcap_interface_list()".
368  */
369 gchar*
370 cant_get_airpcap_if_list_error_message(const char *err_str);
371
372 /*
373  * This function will use the airpcap.dll to find all the airpcap devices.
374  * Will return null if no device is found.
375  */
376 GList*
377 get_airpcap_interface_list(int *err, char *err_str);
378
379 /*
380  * Returns the ASCII string of a key given the key bites
381  */
382 gchar*
383 airpcap_get_key_string(AirpcapKey key);
384
385 /*
386  * Load the configuration for the specified interface
387  */
388 void
389 airpcap_load_selected_if_configuration(airpcap_if_info_t* if_info);
390
391 /*
392  * Save the configuration for the specified interface
393  */
394 void
395 airpcap_save_selected_if_configuration(airpcap_if_info_t* if_info);
396
397 /*
398  * Used to retrieve the name of the interface given the description
399  * (the name is used in AirpcapOpen, the description is put in the combo box)
400  */
401 gchar*
402 get_airpcap_name_from_description(GList* if_list, gchar* description);
403
404 /*
405  * Used to retrieve the airpcap_if_info_t of the selected interface given the
406  * description (that is the entry of the combo box).
407  */
408 gpointer
409 get_airpcap_if_from_description(GList* if_list, const gchar* description);
410
411 /*
412  * Used to retrieve the two chars string from interface description
413  */
414 gchar*
415 airpcap_get_if_string_number(airpcap_if_info_t* if_info);
416
417 /*
418  * Returns the default airpcap interface of a list, NULL if list is empty
419  */
420 airpcap_if_info_t*
421 airpcap_get_default_if(GList* airpcap_if_list);
422
423 /*
424  * Airpcap wrapper, used to save the settings for the selected_if
425  */
426 BOOL
427 airpcap_if_set_device_keys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection);
428
429 /*
430  * Airpcap wrapper, used to save the settings for the selected_if
431  */
432 BOOL
433 airpcap_if_get_device_keys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, PUINT PKeysCollectionSize);
434
435 /*
436  * Airpcap wrapper, used to save the settings for the selected_if
437  */
438 BOOL
439 airpcap_if_set_driver_keys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection);
440
441 /*
442  * Airpcap wrapper, used to save the settings for the selected_if
443  */
444 BOOL
445 airpcap_if_get_driver_keys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, PUINT PKeysCollectionSize);
446
447 /*
448  * Airpcap wrapper, used to get the decryption enabling of an airpcap driver
449  */
450 BOOL
451 airpcap_if_get_driver_decryption_state(PAirpcapHandle ah, PAirpcapDecryptionState PEnable);
452 /*
453  * Airpcap wrapper, used to set the decryption enabling of an airpcap driver
454  */
455 BOOL
456 airpcap_if_set_driver_decryption_state(PAirpcapHandle ah, AirpcapDecryptionState Enable);
457
458 /*
459  * Save the configuration for the specified interface
460  */
461 void
462 airpcap_save_driver_if_configuration(airpcap_if_info_t* fake_if_info);
463
464 /*
465  * Free an instance of airpcap_if_info_t
466  */
467 void
468 airpcap_if_info_free(airpcap_if_info_t *if_info);
469
470 /*
471  * This function will tell the airpcap driver the key list to use
472  * This will be stored into the registry...
473  */
474 BOOL
475 write_wlan_driver_wep_keys_to_regitry(GList* key_list);
476
477 /*
478  * Clear keys and decryption status for the specified interface
479  */
480 void
481 airpcap_if_clear_decryption_settings(airpcap_if_info_t* info_if);
482
483 /* 
484  *  Function used to save to the preference file the Decryption Keys.
485  */
486 int
487 save_wlan_driver_wep_keys();
488
489 /* 
490  *  Function used to save to the preference file the Decryption Keys.
491  */
492 int
493 save_wlan_wireshark_wep_keys(GList* key_ls);
494
495 /*
496  * DECRYPTION KEYS FUNCTIONS
497  */
498 /*
499  * This function is used for DEBUG PURPOSES ONLY!!!
500  */
501 void
502 print_key_list(GList* key_list);
503
504 /*
505  * Retrieves a GList of decryption_key_t structures containing infos about the
506  * keys for the given adapter... returns NULL if no keys are found.
507  */
508 GList*
509 get_airpcap_device_keys(airpcap_if_info_t* if_info);
510
511 /*
512  * Retrieves a GList of decryption_key_t structures containing infos about the
513  * keys for the global AirPcap driver... returns NULL if no keys are found.
514  */
515 GList*
516 get_airpcap_driver_keys();
517
518 /*
519  * Returns the list of the decryption keys specified for wireshark, NULL if
520  * no key is found
521  */
522 GList*
523 get_wireshark_keys();
524
525 /*
526  * Tests if two collection of keys are equal or not, to be considered equals, they have to
527  * contain the same keys in the SAME ORDER! (If both lists are NULL, which means empty will
528  * return TRUE)
529  */
530 gboolean
531 key_lists_are_equal(GList* list1, GList* list2);
532
533 /*
534  * Merges two lists of keys. If a key is found multiple times, it will just appear once!
535  */
536 GList*
537 merge_key_list(GList* list1, GList* list2);
538
539 /*
540  * If the given key is contained in the list, returns TRUE.
541  * Returns FALSE otherwise.
542  */
543 gboolean
544 key_is_in_list(decryption_key_t *dk,GList *list);
545
546 /*
547  * Returns TRUE if keys are equals, FALSE otherwise
548  */
549 gboolean
550 keys_are_equals(decryption_key_t *k1,decryption_key_t *k2);
551
552 /*
553  * Use this function to free a key list.
554  */
555 void
556 free_key_list(GList *list);
557
558 /*
559  * Returns TRUE if the Wireshark decryption is active, FALSE otherwise
560  */
561 gboolean
562 wireshark_decryption_on();
563
564 /*
565  * Returns TRUE if the AirPcap decryption for the current adapter is active, FALSE otherwise
566  */
567 gboolean
568 airpcap_decryption_on();
569
570 /*
571  * Enables decryption for Wireshark if on_off is TRUE, disables it otherwise.
572  */
573 void
574 set_wireshark_decryption(gboolean on_off);
575
576 /*
577  * Enables decryption for all the adapters if on_off is TRUE, disables it otherwise.
578  */
579 gboolean
580 set_airpcap_decryption(gboolean on_off);
581
582 /*
583  * Adds compiled version string to str
584  */
585 void
586 get_compiled_airpcap_version(GString *str);
587
588 void
589 get_runtime_airpcap_version(GString *str);
590
591 /*
592  * Returns the decryption_key_t struct given a string describing the key.
593  * Returns NULL if the key_string cannot be parsed.
594  */
595 decryption_key_t*
596 parse_key_string(gchar* key_string);
597
598 /*
599  * Returns a newly allocated string representing the given decryption_key_t struct
600  */
601 gchar*
602 get_key_string(decryption_key_t* dk);
603
604 #endif