diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-11-30 03:44:06 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-11-30 03:44:06 +0100 |
commit | d5a043a7c0672df5da19a6024da4ab1af45151a9 (patch) | |
tree | ebd86ebe9aaae77e7766c5fa804a847b2d23c537 /src/method.h | |
parent | 8088a82a2a91d29967cef920ba780eecdf72518e (diff) | |
download | fastd-d5a043a7c0672df5da19a6024da4ab1af45151a9.tar fastd-d5a043a7c0672df5da19a6024da4ab1af45151a9.zip |
Rename methods to methods providers and method contexts to methods to reflect their function better
Diffstat (limited to 'src/method.h')
-rw-r--r-- | src/method.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/method.h b/src/method.h index b56db14..c329734 100644 --- a/src/method.h +++ b/src/method.h @@ -32,24 +32,24 @@ struct fastd_method_info { const char *name; - const fastd_method_t *method; - fastd_method_context_t *ctx; + const fastd_method_provider_t *provider; + fastd_method_t *method; }; -struct fastd_method { +struct fastd_method_provider { size_t max_overhead; size_t min_encrypt_head_space; size_t min_decrypt_head_space; size_t min_encrypt_tail_space; size_t min_decrypt_tail_space; - bool (*create_by_name)(const char *name, fastd_method_context_t **method_ctx); - void (*destroy)(fastd_method_context_t *method_ctx); + bool (*create_by_name)(const char *name, fastd_method_t **method); + void (*destroy)(fastd_method_t *method); - size_t (*key_length)(fastd_context_t *ctx, const fastd_method_context_t *method_ctx); + size_t (*key_length)(fastd_context_t *ctx, const fastd_method_t *method); - fastd_method_session_state_t* (*session_init)(fastd_context_t *ctx, const fastd_method_context_t *method_ctx, const uint8_t *secret, bool initiator); - fastd_method_session_state_t* (*session_init_compat)(fastd_context_t *ctx, const fastd_method_context_t *method_ctx, const uint8_t *secret, size_t length, bool initiator); + fastd_method_session_state_t* (*session_init)(fastd_context_t *ctx, const fastd_method_t *method, const uint8_t *secret, bool initiator); + fastd_method_session_state_t* (*session_init_compat)(fastd_context_t *ctx, const fastd_method_t *method, const uint8_t *secret, size_t length, bool initiator); bool (*session_is_valid)(fastd_context_t *ctx, fastd_method_session_state_t *session); bool (*session_is_initiator)(fastd_context_t *ctx, fastd_method_session_state_t *session); bool (*session_want_refresh)(fastd_context_t *ctx, fastd_method_session_state_t *session); @@ -61,7 +61,7 @@ struct fastd_method { }; -bool fastd_method_create_by_name(const char *name, const fastd_method_t **method, fastd_method_context_t **method_ctx); +bool fastd_method_create_by_name(const char *name, const fastd_method_provider_t **provider, fastd_method_t **method); static inline const fastd_method_info_t* fastd_method_get_by_name(fastd_context_t *ctx, const char *name) { |