summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/crypto.h15
-rw-r--r--src/crypto/cipher/ciphers.c.in4
-rw-r--r--src/crypto/mac/macs.c.in4
-rw-r--r--src/method.h1
-rw-r--r--src/methods/methods.c.in1
5 files changed, 16 insertions, 9 deletions
diff --git a/src/crypto.h b/src/crypto.h
index c55e931..5571bf9 100644
--- a/src/crypto.h
+++ b/src/crypto.h
@@ -77,16 +77,31 @@ struct fastd_mac {
};
+/** Initializes the list of cipher implementations */
void fastd_cipher_init(void);
+
+/** Configures a cipher to use a specific implementation */
bool fastd_cipher_config(const char *name, const char *impl);
+
+/** Returns information about the cipher with the specified name if there is an implementation available */
const fastd_cipher_info_t * fastd_cipher_info_get_by_name(const char *name);
+
+/** Returns the chosen cipher implementation for a given cipher */
const fastd_cipher_t * fastd_cipher_get(const fastd_cipher_info_t *info);
+
+/** Initializes the list of MAC implementations */
void fastd_mac_init(void);
+
+/** Configures a MAC to use a specific implementation */
bool fastd_mac_config(const char *name, const char *impl);
+
+/** Returns information about the MAC with the specified name if there is an implementation available */
const fastd_mac_info_t * fastd_mac_info_get_by_name(const char *name);
+
+/** Returns the chosen MAC implementation for a given cipher */
const fastd_mac_t * fastd_mac_get(const fastd_mac_info_t *info);
diff --git a/src/crypto/cipher/ciphers.c.in b/src/crypto/cipher/ciphers.c.in
index 6822efc..4b8c929 100644
--- a/src/crypto/cipher/ciphers.c.in
+++ b/src/crypto/cipher/ciphers.c.in
@@ -64,7 +64,6 @@ static inline bool cipher_available(const fastd_cipher_t *cipher) {
return (!cipher->available) || cipher->available();
}
-/** Initializes the list of cipher implementations */
void fastd_cipher_init(void) {
size_t i, j;
for (i = 0; i < array_size(ciphers); i++) {
@@ -77,7 +76,6 @@ void fastd_cipher_init(void) {
}
}
-/** Configures a cipher to use a specific implementation */
bool fastd_cipher_config(const char *name, const char *impl) {
size_t i;
for (i = 0; i < array_size(ciphers); i++) {
@@ -100,7 +98,6 @@ bool fastd_cipher_config(const char *name, const char *impl) {
return false;
}
-/** Returns information about the cipher with the specified name if there is an implementation available */
const fastd_cipher_info_t * fastd_cipher_info_get_by_name(const char *name) {
size_t i;
for (i = 0; i < array_size(ciphers); i++) {
@@ -116,7 +113,6 @@ const fastd_cipher_info_t * fastd_cipher_info_get_by_name(const char *name) {
return NULL;
}
-/** Returns the chosen cipher implementation for a given cipher */
const fastd_cipher_t * fastd_cipher_get(const fastd_cipher_info_t *info) {
size_t i;
for (i = 0; i < array_size(ciphers); i++) {
diff --git a/src/crypto/mac/macs.c.in b/src/crypto/mac/macs.c.in
index c4cbecc..29e9f57 100644
--- a/src/crypto/mac/macs.c.in
+++ b/src/crypto/mac/macs.c.in
@@ -64,7 +64,6 @@ static inline bool mac_available(const fastd_mac_t *mac) {
return (!mac->available) || mac->available();
}
-/** Initializes the list of MAC implementations */
void fastd_mac_init(void) {
size_t i, j;
for (i = 0; i < array_size(macs); i++) {
@@ -77,7 +76,6 @@ void fastd_mac_init(void) {
}
}
-/** Configures a MAC to use a specific implementation */
bool fastd_mac_config(const char *name, const char *impl) {
size_t i;
for (i = 0; i < array_size(macs); i++) {
@@ -100,7 +98,6 @@ bool fastd_mac_config(const char *name, const char *impl) {
return false;
}
-/** Returns information about the MAC with the specified name if there is an implementation available */
const fastd_mac_info_t * fastd_mac_info_get_by_name(const char *name) {
size_t i;
for (i = 0; i < array_size(macs); i++) {
@@ -116,7 +113,6 @@ const fastd_mac_info_t * fastd_mac_info_get_by_name(const char *name) {
return NULL;
}
-/** Returns the chosen MAC implementation for a given cipher */
const fastd_mac_t * fastd_mac_get(const fastd_mac_info_t *info) {
size_t i;
for (i = 0; i < array_size(macs); i++) {
diff --git a/src/method.h b/src/method.h
index de1fb58..b003fa0 100644
--- a/src/method.h
+++ b/src/method.h
@@ -81,6 +81,7 @@ struct fastd_method_provider {
};
+/** Searches for a provider providing a method and instanciates it */
bool fastd_method_create_by_name(const char *name, const fastd_method_provider_t **provider, fastd_method_t **method);
diff --git a/src/methods/methods.c.in b/src/methods/methods.c.in
index 672ef70..26cae1a 100644
--- a/src/methods/methods.c.in
+++ b/src/methods/methods.c.in
@@ -40,7 +40,6 @@ static const fastd_method_provider_t *const providers[] = { @METHOD_LIST@
};
-/** Searches for a provider providing a method and instanciates it */
bool fastd_method_create_by_name(const char *name, const fastd_method_provider_t **provider, fastd_method_t **method) {
size_t i;
for (i = 0; i < array_size(providers); i++) {