diff options
author | Graham Leggett <minfrin@apache.org> | 2011-05-30 23:30:24 +0000 |
---|---|---|
committer | Graham Leggett <minfrin@apache.org> | 2011-05-30 23:30:24 +0000 |
commit | 8a6fb4989975d5f1191d77f7bd32f477b3ab4866 (patch) | |
tree | 93b3f69c4d1ea7e2ed88d56bbbb792b70098365f /include/private | |
parent | 4cb7ddda4e975ce242deb131d6e2d90ebdbe2cc7 (diff) | |
download | apr-8a6fb4989975d5f1191d77f7bd32f477b3ab4866.tar.gz |
apr_crypto: Add apr_crypto_get_block_key_types() and
apr_crypto_get_block_key_modes() to provide a way to programmatically
query what key types and modes are supported by a provider, either per
mode/type, or by iterating through a hashtable.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1129433 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/private')
-rw-r--r-- | include/private/apr_crypto_internal.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/private/apr_crypto_internal.h b/include/private/apr_crypto_internal.h index 4bb670ae8..1d9e169d9 100644 --- a/include/private/apr_crypto_internal.h +++ b/include/private/apr_crypto_internal.h @@ -57,6 +57,28 @@ struct apr_crypto_driver_t { const apr_array_header_t *params, apr_pool_t *pool); /** + * @brief Get a hash table of key types, keyed by the name of the type against + * an integer pointer constant. + * + * @param types - hashtable of key types keyed to constants. + * @param f - encryption context + * @return APR_SUCCESS for success + */ + apr_status_t (*get_block_key_types)(apr_hash_t **types, + const apr_crypto_t *f); + + /** + * @brief Get a hash table of key modes, keyed by the name of the mode against + * an integer pointer constant. + * + * @param modes - hashtable of key modes keyed to constants. + * @param f - encryption context + * @return APR_SUCCESS for success + */ + apr_status_t (*get_block_key_modes)(apr_hash_t **modes, + const apr_crypto_t *f); + + /** * @brief Create a key from the given passphrase. By default, the PBKDF2 * algorithm is used to generate the key from the passphrase. It is expected * that the same pass phrase will generate the same key, regardless of the |