aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstate
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstate')
-rw-r--r--src/libstate/init.h2
-rw-r--r--src/libstate/libstate.h4
-rw-r--r--src/libstate/lookup.cpp20
-rw-r--r--src/libstate/lookup.h57
4 files changed, 43 insertions, 40 deletions
diff --git a/src/libstate/init.h b/src/libstate/init.h
index 8b0ce80de..4c4a09d1f 100644
--- a/src/libstate/init.h
+++ b/src/libstate/init.h
@@ -28,7 +28,7 @@ class BOTAN_DLL LibraryInitializer
/**
* Initialize the library
- * @param thread_safe if the library should use a thread-safe mutex
+ * @param options a string listing initialization options
*/
LibraryInitializer(const std::string& options = "")
{ LibraryInitializer::initialize(options); }
diff --git a/src/libstate/libstate.h b/src/libstate/libstate.h
index 4674eca88..8f76ed8b2 100644
--- a/src/libstate/libstate.h
+++ b/src/libstate/libstate.h
@@ -69,8 +69,7 @@ class BOTAN_DLL Library_State
const std::string& key) const;
/**
- * Check whether a certain parameter is set
- * or not.
+ * Check whether a certain parameter is set or not.
* @param section the section of the desired key
* @param key the desired keys name
* @result true if the parameters value is set,
@@ -83,6 +82,7 @@ class BOTAN_DLL Library_State
* Set a configuration parameter.
* @param section the section of the desired key
* @param key the desired keys name
+ * @param value the new value
* @param overwrite if set to true, the parameters value
* will be overwritten even if it is already set, otherwise
* no existing values will be overwritten.
diff --git a/src/libstate/lookup.cpp b/src/libstate/lookup.cpp
index 01f4a3d42..586c335e6 100644
--- a/src/libstate/lookup.cpp
+++ b/src/libstate/lookup.cpp
@@ -11,7 +11,7 @@
namespace Botan {
-/**
+/*
* Query if an algorithm exists
*/
bool have_algorithm(const std::string& name)
@@ -29,7 +29,7 @@ bool have_algorithm(const std::string& name)
return false;
}
-/**
+/*
* Query the block size of a cipher or hash
*/
u32bit block_size_of(const std::string& name)
@@ -45,7 +45,7 @@ u32bit block_size_of(const std::string& name)
throw Algorithm_Not_Found(name);
}
-/**
+/*
* Query the OUTPUT_LENGTH of a hash or MAC
*/
u32bit output_length_of(const std::string& name)
@@ -61,7 +61,7 @@ u32bit output_length_of(const std::string& name)
throw Algorithm_Not_Found(name);
}
-/**
+/*
* Check if a keylength is valid for this algo
*/
bool valid_keylength_for(u32bit key_len, const std::string& name)
@@ -80,7 +80,7 @@ bool valid_keylength_for(u32bit key_len, const std::string& name)
throw Algorithm_Not_Found(name);
}
-/**
+/*
* Query the MINIMUM_KEYLENGTH of an algorithm
*/
u32bit min_keylength_of(const std::string& name)
@@ -99,7 +99,7 @@ u32bit min_keylength_of(const std::string& name)
throw Algorithm_Not_Found(name);
}
-/**
+/*
* Query the MAXIMUM_KEYLENGTH of an algorithm
*/
u32bit max_keylength_of(const std::string& name)
@@ -118,7 +118,7 @@ u32bit max_keylength_of(const std::string& name)
throw Algorithm_Not_Found(name);
}
-/**
+/*
* Query the KEYLENGTH_MULTIPLE of an algorithm
*/
u32bit keylength_multiple_of(const std::string& name)
@@ -137,7 +137,7 @@ u32bit keylength_multiple_of(const std::string& name)
throw Algorithm_Not_Found(name);
}
-/**
+/*
* Get a cipher object
*/
Keyed_Filter* get_cipher(const std::string& algo_spec,
@@ -156,7 +156,7 @@ Keyed_Filter* get_cipher(const std::string& algo_spec,
throw Algorithm_Not_Found(algo_spec);
}
-/**
+/*
* Get a cipher object
*/
Keyed_Filter* get_cipher(const std::string& algo_spec,
@@ -173,7 +173,7 @@ Keyed_Filter* get_cipher(const std::string& algo_spec,
return cipher;
}
-/**
+/*
* Get a cipher object
*/
Keyed_Filter* get_cipher(const std::string& algo_spec,
diff --git a/src/libstate/lookup.h b/src/libstate/lookup.h
index 5f10bb3f8..64de67489 100644
--- a/src/libstate/lookup.h
+++ b/src/libstate/lookup.h
@@ -105,7 +105,7 @@ inline MessageAuthenticationCode* get_mac(const std::string& algo_spec)
/**
* String to key algorithm factory method.
-* @param name the name of the desired string to key (S2K) algorithm
+* @param algo_spec the name of the desired string to key (S2K) algorithm
* @return a pointer to the string to key algorithm object
*/
BOTAN_DLL S2K* get_s2k(const std::string& algo_spec);
@@ -118,7 +118,7 @@ BOTAN_DLL S2K* get_s2k(const std::string& algo_spec);
/**
* Factory method for EME (message-encoding methods for encryption) objects
-* @param name the name of the EME to create
+* @param algo_spec the name of the EME to create
* @return a pointer to the desired EME object
*/
BOTAN_DLL EME* get_eme(const std::string& algo_spec);
@@ -126,14 +126,14 @@ BOTAN_DLL EME* get_eme(const std::string& algo_spec);
/**
* Factory method for EMSA (message-encoding methods for signatures
* with appendix) objects
-* @param name the name of the EME to create
+* @param algo_spec the name of the EME to create
* @return a pointer to the desired EME object
*/
BOTAN_DLL EMSA* get_emsa(const std::string& algo_spec);
/**
* Factory method for KDF (key derivation function)
-* @param name the name of the KDF to create
+* @param algo_spec the name of the KDF to create
* @return a pointer to the desired KDF object
*/
BOTAN_DLL KDF* get_kdf(const std::string& algo_spec);
@@ -152,10 +152,11 @@ BOTAN_DLL KDF* get_kdf(const std::string& algo_spec);
* or decrypting filter
* @return a pointer to the encryption or decryption filter
*/
-BOTAN_DLL Keyed_Filter* get_cipher(const std::string& name,
+BOTAN_DLL Keyed_Filter* get_cipher(const std::string& algo_spec,
const SymmetricKey& key,
const InitializationVector& iv,
- Cipher_Dir dir);
+ Cipher_Dir direction);
+
/**
* Factory method for general symmetric cipher filters.
* @param algo_spec the name of the desired cipher
@@ -165,30 +166,32 @@ BOTAN_DLL Keyed_Filter* get_cipher(const std::string& name,
* or decrypting filter
* @return a pointer to the encryption or decryption filter
*/
-BOTAN_DLL Keyed_Filter* get_cipher(const std::string& name,
+BOTAN_DLL Keyed_Filter* get_cipher(const std::string& algo_spec,
const SymmetricKey& key,
- Cipher_Dir dir);
+ Cipher_Dir direction);
-/** Factory method for general symmetric cipher filters. No key will
-* be set in the filter.
+/**
+* Factory method for general symmetric cipher filters. No key will be
+* set in the filter.
+*
* @param algo_spec the name of the desired cipher
-
* @param direction determines whether the filter will be an encrypting or
* decrypting filter
* @return a pointer to the encryption or decryption filter
*/
-BOTAN_DLL Keyed_Filter* get_cipher(const std::string& name, Cipher_Dir dir);
+BOTAN_DLL Keyed_Filter* get_cipher(const std::string& algo_spec,
+ Cipher_Dir direction);
/**
* Check if an algorithm exists.
-* @param name the name of the algorithm to check for
+* @param algo_spec the name of the algorithm to check for
* @return true if the algorithm exists, false otherwise
*/
BOTAN_DLL bool have_algorithm(const std::string& algo_spec);
/**
* Check if a block cipher algorithm exists.
-* @param name the name of the algorithm to check for
+* @param algo_spec the name of the algorithm to check for
* @return true if the algorithm exists, false otherwise
*/
inline bool have_block_cipher(const std::string& algo_spec)
@@ -199,7 +202,7 @@ inline bool have_block_cipher(const std::string& algo_spec)
/**
* Check if a stream cipher algorithm exists.
-* @param name the name of the algorithm to check for
+* @param algo_spec the name of the algorithm to check for
* @return true if the algorithm exists, false otherwise
*/
inline bool have_stream_cipher(const std::string& algo_spec)
@@ -236,15 +239,15 @@ inline bool have_mac(const std::string& algo_spec)
/**
* Find out the block size of a certain symmetric algorithm.
-* @param name the name of the algorithm
-* @return the block size of the specified algorithm
+* @param algo_spec the name of the algorithm
+* @return block size of the specified algorithm
*/
BOTAN_DLL u32bit block_size_of(const std::string& algo_spec);
/**
* Find out the output length of a certain symmetric algorithm.
-* @param name the name of the algorithm
-* @return the output length of the specified algorithm
+* @param algo_spec the name of the algorithm
+* @return output length of the specified algorithm
*/
BOTAN_DLL u32bit output_length_of(const std::string& algo_spec);
@@ -252,30 +255,30 @@ BOTAN_DLL u32bit output_length_of(const std::string& algo_spec);
* Find out the whether a certain key length is allowd for a given
* symmetric algorithm.
* @param key_len the key length in question
-* @param name the name of the algorithm
+* @param algo_spec the name of the algorithm
* @return true if the key length is valid for that algorithm, false otherwise
*/
-BOTAN_DLL bool valid_keylength_for(u32bit keylen,
+BOTAN_DLL bool valid_keylength_for(u32bit key_len,
const std::string& algo_spec);
/**
* Find out the minimum key size of a certain symmetric algorithm.
-* @param name the name of the algorithm
-* @return the minimum key length of the specified algorithm
+* @param algo_spec the name of the algorithm
+* @return minimum key length of the specified algorithm
*/
BOTAN_DLL u32bit min_keylength_of(const std::string& algo_spec);
/**
* Find out the maximum key size of a certain symmetric algorithm.
-* @param name the name of the algorithm
-* @return the maximum key length of the specified algorithm
+* @param algo_spec the name of the algorithm
+* @return maximum key length of the specified algorithm
*/
BOTAN_DLL u32bit max_keylength_of(const std::string& algo_spec);
/**
* Find out the size any valid key is a multiple of for a certain algorithm.
-* @param name the name of the algorithm
-* @return the size any valid key is a multiple of
+* @param algo_spec the name of the algorithm
+* @return size any valid key is a multiple of
*/
BOTAN_DLL u32bit keylength_multiple_of(const std::string& algo_spec);