diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-11-29 23:18:21 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-11-30 00:42:35 +0100 |
commit | 1111dc8e5e9e78254c1a7a891d961713e1be9db0 (patch) | |
tree | 3490dad7d1c43d32a9c5d362d6f03bb17cb5408a /src/crypto.h | |
parent | a09d04a02231964fa5a8f0113e9909cfb140fe4e (diff) | |
download | fastd-1111dc8e5e9e78254c1a7a891d961713e1be9db0.tar fastd-1111dc8e5e9e78254c1a7a891d961713e1be9db0.zip |
Remove cipher and MAC contexts
Not a single implementation was using them...
Diffstat (limited to 'src/crypto.h')
-rw-r--r-- | src/crypto.h | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/src/crypto.h b/src/crypto.h index 968483e..7ee73cd 100644 --- a/src/crypto.h +++ b/src/crypto.h @@ -38,13 +38,9 @@ struct fastd_cipher_info { struct fastd_cipher { bool (*available)(void); - fastd_cipher_context_t* (*initialize)(fastd_context_t *ctx); - fastd_cipher_state_t* (*init_state)(fastd_context_t *ctx, const fastd_cipher_context_t *cctx, const uint8_t *key); - + fastd_cipher_state_t* (*init)(fastd_context_t *ctx, const uint8_t *key); bool (*crypt)(fastd_context_t *ctx, const fastd_cipher_state_t *state, fastd_block128_t *out, const fastd_block128_t *in, size_t len, const uint8_t *iv); - - void (*free_state)(fastd_context_t *ctx, fastd_cipher_state_t *state); - void (*free)(fastd_context_t *ctx, fastd_cipher_context_t *cctx); + void (*free)(fastd_context_t *ctx, fastd_cipher_state_t *state); }; @@ -55,24 +51,16 @@ struct fastd_mac_info { struct fastd_mac { bool (*available)(void); - fastd_mac_context_t* (*initialize)(fastd_context_t *ctx); - fastd_mac_state_t* (*init_state)(fastd_context_t *ctx, const fastd_mac_context_t *mctx, const uint8_t *key); - + fastd_mac_state_t* (*init)(fastd_context_t *ctx, const uint8_t *key); bool (*hash)(fastd_context_t *ctx, const fastd_mac_state_t *state, fastd_block128_t *out, const fastd_block128_t *in, size_t n_blocks); - - void (*free_state)(fastd_context_t *ctx, fastd_mac_state_t *state); - void (*free)(fastd_context_t *ctx, fastd_mac_context_t *mctx); + void (*free)(fastd_context_t *ctx, fastd_mac_state_t *state); }; -void fastd_cipher_init(fastd_context_t *ctx); -void fastd_cipher_free(fastd_context_t *ctx); const fastd_cipher_info_t* fastd_cipher_info_get_by_name(const char *name); -const fastd_cipher_t* fastd_cipher_get_by_name(fastd_context_t *ctx, const char *name, const fastd_cipher_info_t **info, const fastd_cipher_context_t **cctx); +const fastd_cipher_t* fastd_cipher_get_by_name(fastd_context_t *ctx, const char *name, const fastd_cipher_info_t **info); -void fastd_mac_init(fastd_context_t *ctx); -void fastd_mac_free(fastd_context_t *ctx); const fastd_mac_info_t* fastd_mac_info_get_by_name(const char *name); -const fastd_mac_t* fastd_mac_get_by_name(fastd_context_t *ctx, const char *name, const fastd_mac_info_t **info, const fastd_mac_context_t **cctx); +const fastd_mac_t* fastd_mac_get_by_name(fastd_context_t *ctx, const char *name, const fastd_mac_info_t **info); #endif /* _FASTD_CRYPTO_H_ */ |