From: levitte Date: Wed, 1 Oct 2008 09:59:38 +0000 (+0000) Subject: Add functionality to create and destroy configurations. X-Git-Tag: yubikey-personalisation_0.97-1~142 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de9c1d6c43b40199ed0bd75da37dd84df875c4e1;p=yubikey-personalization.old Add functionality to create and destroy configurations. The readers and writers need to get the userdata to be able to pass it on. git-svn-id: https://yubikey-personalization.googlecode.com/svn/trunk@19 b62f149e-849f-11dd-9899-c7ba65f7c4c7 --- diff --git a/ykpers.h b/ykpers.h index 6a620d3..02dad5c 100644 --- a/ykpers.h +++ b/ykpers.h @@ -33,15 +33,20 @@ #include +CONFIG *ykp_create_config(void); +int ykp_free_config(CONFIG *cfg); + int ykp_AES_key_from_passphrase(CONFIG *cfg, const char *passphrase); int ykp_set_access_code(CONFIG *cfg, unsigned char *access_code); -int ykp_write_config(CONFIG *cfg, - int (*writer)(const void *buf, size_t count, - void *userdata)); +int ykp_write_config(const CONFIG *cfg, + int (*writer)(const char *buf, size_t count, + void *userdata), + void *userdata); int ykp_read_config(CONFIG *cfg, - int (*reader)(const void *buf, size_t count, - void *userdata)); + int (*reader)(char *buf, size_t count, + void *userdata), + void *userdata); #endif // __YKPERS_H_INCLUDED__