diff options
Diffstat (limited to 'src/libstrongswan/crypto/crypto_factory.h')
-rw-r--r-- | src/libstrongswan/crypto/crypto_factory.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/src/libstrongswan/crypto/crypto_factory.h b/src/libstrongswan/crypto/crypto_factory.h index ff06eda7b..61c46b59c 100644 --- a/src/libstrongswan/crypto/crypto_factory.h +++ b/src/libstrongswan/crypto/crypto_factory.h @@ -33,6 +33,11 @@ typedef struct crypto_factory_t crypto_factory_t; #include <crypto/diffie_hellman.h> #include <crypto/transform.h> +<<<<<<< HEAD +======= +#define CRYPTO_MAX_ALG_LINE 120 /* characters */ + +>>>>>>> upstream/4.5.1 /** * Constructor function for crypters */ @@ -144,11 +149,19 @@ struct crypto_factory_t { * Register a crypter constructor. * * @param algo algorithm to constructor +<<<<<<< HEAD +======= + * @param plugin_name plugin that registered this algorithm +>>>>>>> upstream/4.5.1 * @param create constructor function for that algorithm * @return */ void (*add_crypter)(crypto_factory_t *this, encryption_algorithm_t algo, +<<<<<<< HEAD crypter_constructor_t create); +======= + const char *plugin_name, crypter_constructor_t create); +>>>>>>> upstream/4.5.1 /** * Unregister a crypter constructor. @@ -168,21 +181,37 @@ struct crypto_factory_t { * Register a aead constructor. * * @param algo algorithm to constructor +<<<<<<< HEAD +======= + * @param plugin_name plugin that registered this algorithm +>>>>>>> upstream/4.5.1 * @param create constructor function for that algorithm * @return */ void (*add_aead)(crypto_factory_t *this, encryption_algorithm_t algo, +<<<<<<< HEAD aead_constructor_t create); +======= + const char *plugin_name, aead_constructor_t create); +>>>>>>> upstream/4.5.1 /** * Register a signer constructor. * * @param algo algorithm to constructor +<<<<<<< HEAD +======= + * @param plugin_name plugin that registered this algorithm +>>>>>>> upstream/4.5.1 * @param create constructor function for that algorithm * @return */ void (*add_signer)(crypto_factory_t *this, integrity_algorithm_t algo, +<<<<<<< HEAD signer_constructor_t create); +======= + const char *plugin_name, signer_constructor_t create); +>>>>>>> upstream/4.5.1 /** * Unregister a signer constructor. @@ -198,11 +227,19 @@ struct crypto_factory_t { * create_hasher(HASH_PREFERRED). * * @param algo algorithm to constructor +<<<<<<< HEAD +======= + * @param plugin_name plugin that registered this algorithm +>>>>>>> upstream/4.5.1 * @param create constructor function for that algorithm * @return */ void (*add_hasher)(crypto_factory_t *this, hash_algorithm_t algo, +<<<<<<< HEAD hasher_constructor_t create); +======= + const char *plugin_name, hasher_constructor_t create); +>>>>>>> upstream/4.5.1 /** * Unregister a hasher constructor. @@ -215,11 +252,19 @@ struct crypto_factory_t { * Register a prf constructor. * * @param algo algorithm to constructor +<<<<<<< HEAD +======= + * @param plugin_name plugin that registered this algorithm +>>>>>>> upstream/4.5.1 * @param create constructor function for that algorithm * @return */ void (*add_prf)(crypto_factory_t *this, pseudo_random_function_t algo, +<<<<<<< HEAD prf_constructor_t create); +======= + const char *plugin_name, prf_constructor_t create); +>>>>>>> upstream/4.5.1 /** * Unregister a prf constructor. @@ -232,9 +277,17 @@ struct crypto_factory_t { * Register a source of randomness. * * @param quality quality of randomness this RNG serves +<<<<<<< HEAD * @param create constructor function for such a quality */ void (*add_rng)(crypto_factory_t *this, rng_quality_t quality, rng_constructor_t create); +======= + * @param plugin_name plugin that registered this algorithm + * @param create constructor function for such a quality + */ + void (*add_rng)(crypto_factory_t *this, rng_quality_t quality, + const char *plugin_name, rng_constructor_t create); +>>>>>>> upstream/4.5.1 /** * Unregister a source of randomness. @@ -247,11 +300,19 @@ struct crypto_factory_t { * Register a diffie hellman constructor. * * @param group dh group to constructor +<<<<<<< HEAD +======= + * @param plugin_name plugin that registered this algorithm +>>>>>>> upstream/4.5.1 * @param create constructor function for that algorithm * @return */ void (*add_dh)(crypto_factory_t *this, diffie_hellman_group_t group, +<<<<<<< HEAD dh_constructor_t create); +======= + const char *plugin_name, dh_constructor_t create); +>>>>>>> upstream/4.5.1 /** * Unregister a diffie hellman constructor. @@ -303,6 +364,16 @@ struct crypto_factory_t { enumerator_t* (*create_dh_enumerator)(crypto_factory_t *this); /** +<<<<<<< HEAD +======= + * Create an enumerator over all registered random generators. + * + * @return enumerator over rng_quality_t + */ + enumerator_t* (*create_rng_enumerator)(crypto_factory_t *this); + + /** +>>>>>>> upstream/4.5.1 * Add a test vector to the crypto factory. * * @param type type of the test vector |