aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/algo_factory/algo_factory.cpp36
-rw-r--r--src/alloc/secmem.h4
-rw-r--r--src/asn1/der_enc.h9
-rw-r--r--src/block/block_cipher.h4
-rw-r--r--src/cert/cvc/cvc_ado.h1
-rw-r--r--src/cert/cvc/cvc_cert.h3
-rw-r--r--src/cert/cvc/cvc_gen_cert.h1
-rw-r--r--src/cert/cvc/cvc_self.h9
-rw-r--r--src/cert/cvc/signed_obj.h6
-rw-r--r--src/cert/x509/crl_ent.h3
-rw-r--r--src/cert/x509/x509_ca.h2
-rw-r--r--src/cert/x509/x509_crl.h6
-rw-r--r--src/constructs/passhash/passhash9.h2
-rw-r--r--src/filters/data_snk.h4
-rw-r--r--src/filters/data_src.h19
-rw-r--r--src/filters/filters.h8
-rw-r--r--src/filters/key_filt.h2
-rw-r--r--src/filters/modes/cbc/cbc.h4
-rw-r--r--src/filters/pbe.h9
-rw-r--r--src/filters/pipe.h8
-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
-rw-r--r--src/mac/mac.cpp2
-rw-r--r--src/mac/mac.h4
-rw-r--r--src/math/bigint/bigint.h15
-rw-r--r--src/pbe/get_pbe.h9
-rw-r--r--src/pubkey/dh/dh.h2
-rw-r--r--src/pubkey/ecdh/ecdh.h3
-rw-r--r--src/pubkey/ecdsa/ecdsa.h6
-rw-r--r--src/pubkey/gost_3410/gost_3410.h3
-rw-r--r--src/pubkey/pk_keys.h2
-rw-r--r--src/pubkey/pubkey.h2
-rw-r--r--src/pubkey/x509_key.h16
-rw-r--r--src/s2k/pbkdf1/pbkdf1.h2
-rw-r--r--src/ssl/rec_read.cpp8
-rw-r--r--src/stream/stream_cipher.h2
-rw-r--r--src/stream/turing/turing.h2
-rw-r--r--src/sym_algo/sym_algo.h2
-rw-r--r--src/utils/buf_comp/buf_comp.h2
41 files changed, 173 insertions, 132 deletions
diff --git a/src/algo_factory/algo_factory.cpp b/src/algo_factory/algo_factory.cpp
index e8a2a0913..13e81e7f5 100644
--- a/src/algo_factory/algo_factory.cpp
+++ b/src/algo_factory/algo_factory.cpp
@@ -22,7 +22,7 @@ namespace Botan {
namespace {
-/**
+/*
* Template functions for the factory prototype/search algorithm
*/
template<typename T>
@@ -84,7 +84,7 @@ const T* factory_prototype(const std::string& algo_spec,
}
-/**
+/*
* Setup caches
*/
Algorithm_Factory::Algorithm_Factory(Mutex_Factory& mf)
@@ -95,7 +95,7 @@ Algorithm_Factory::Algorithm_Factory(Mutex_Factory& mf)
mac_cache = new Algorithm_Cache<MessageAuthenticationCode>(mf.make());
}
-/**
+/*
* Delete all engines
*/
Algorithm_Factory::~Algorithm_Factory()
@@ -113,7 +113,7 @@ void Algorithm_Factory::add_engine(Engine* engine)
engines.push_back(engine);
}
-/**
+/*
* Set the preferred provider for an algorithm
*/
void Algorithm_Factory::set_preferred_provider(const std::string& algo_spec,
@@ -129,7 +129,7 @@ void Algorithm_Factory::set_preferred_provider(const std::string& algo_spec,
mac_cache->set_preferred_provider(algo_spec, provider);
}
-/**
+/*
* Get an engine out of the list
*/
Engine* Algorithm_Factory::get_engine_n(u32bit n) const
@@ -139,7 +139,7 @@ Engine* Algorithm_Factory::get_engine_n(u32bit n) const
return engines[n];
}
-/**
+/*
* Return the possible providers of a request
* Note: assumes you don't have different types by the same name
*/
@@ -163,7 +163,7 @@ Algorithm_Factory::providers_of(const std::string& algo_spec)
return std::vector<std::string>();
}
-/**
+/*
* Return the prototypical block cipher corresponding to this request
*/
const BlockCipher*
@@ -174,7 +174,7 @@ Algorithm_Factory::prototype_block_cipher(const std::string& algo_spec,
*this, block_cipher_cache);
}
-/**
+/*
* Return the prototypical stream cipher corresponding to this request
*/
const StreamCipher*
@@ -185,7 +185,7 @@ Algorithm_Factory::prototype_stream_cipher(const std::string& algo_spec,
*this, stream_cipher_cache);
}
-/**
+/*
* Return the prototypical object corresponding to this request (if found)
*/
const HashFunction*
@@ -196,7 +196,7 @@ Algorithm_Factory::prototype_hash_function(const std::string& algo_spec,
*this, hash_cache);
}
-/**
+/*
* Return the prototypical object corresponding to this request
*/
const MessageAuthenticationCode*
@@ -208,7 +208,7 @@ Algorithm_Factory::prototype_mac(const std::string& algo_spec,
*this, mac_cache);
}
-/**
+/*
* Return a new block cipher corresponding to this request
*/
BlockCipher*
@@ -220,7 +220,7 @@ Algorithm_Factory::make_block_cipher(const std::string& algo_spec,
throw Algorithm_Not_Found(algo_spec);
}
-/**
+/*
* Return a new stream cipher corresponding to this request
*/
StreamCipher*
@@ -232,7 +232,7 @@ Algorithm_Factory::make_stream_cipher(const std::string& algo_spec,
throw Algorithm_Not_Found(algo_spec);
}
-/**
+/*
* Return a new object corresponding to this request
*/
HashFunction*
@@ -244,7 +244,7 @@ Algorithm_Factory::make_hash_function(const std::string& algo_spec,
throw Algorithm_Not_Found(algo_spec);
}
-/**
+/*
* Return a new object corresponding to this request
*/
MessageAuthenticationCode*
@@ -256,7 +256,7 @@ Algorithm_Factory::make_mac(const std::string& algo_spec,
throw Algorithm_Not_Found(algo_spec);
}
-/**
+/*
* Add a new block cipher
*/
void Algorithm_Factory::add_block_cipher(BlockCipher* block_cipher,
@@ -265,7 +265,7 @@ void Algorithm_Factory::add_block_cipher(BlockCipher* block_cipher,
block_cipher_cache->add(block_cipher, block_cipher->name(), provider);
}
-/**
+/*
* Add a new stream cipher
*/
void Algorithm_Factory::add_stream_cipher(StreamCipher* stream_cipher,
@@ -274,7 +274,7 @@ void Algorithm_Factory::add_stream_cipher(StreamCipher* stream_cipher,
stream_cipher_cache->add(stream_cipher, stream_cipher->name(), provider);
}
-/**
+/*
* Add a new hash
*/
void Algorithm_Factory::add_hash_function(HashFunction* hash,
@@ -283,7 +283,7 @@ void Algorithm_Factory::add_hash_function(HashFunction* hash,
hash_cache->add(hash, hash->name(), provider);
}
-/**
+/*
* Add a new mac
*/
void Algorithm_Factory::add_mac(MessageAuthenticationCode* mac,
diff --git a/src/alloc/secmem.h b/src/alloc/secmem.h
index b3b3fa973..d1a3ba7bd 100644
--- a/src/alloc/secmem.h
+++ b/src/alloc/secmem.h
@@ -97,7 +97,7 @@ class MemoryRegion
/**
* Copy the contents of another buffer into this buffer.
* The former contents of *this are discarded.
- * @param in the buffer to copy the contents from.
+ * @param other the buffer to copy the contents from.
* @return a reference to *this
*/
MemoryRegion<T>& operator=(const MemoryRegion<T>& other)
@@ -156,7 +156,7 @@ class MemoryRegion
/**
* Append data to the end of this buffer.
- * @param data the buffer containing the data to append
+ * @param other the buffer containing the data to append
*/
void append(const MemoryRegion<T>& other)
{ append(other.begin(), other.size()); }
diff --git a/src/asn1/der_enc.h b/src/asn1/der_enc.h
index 23b5297e5..3037ee707 100644
--- a/src/asn1/der_enc.h
+++ b/src/asn1/der_enc.h
@@ -13,6 +13,9 @@
namespace Botan {
+class BigInt;
+class ASN1_Object;
+
/*
* General DER Encoding Object
*/
@@ -33,13 +36,13 @@ class BOTAN_DLL DER_Encoder
DER_Encoder& encode_null();
DER_Encoder& encode(bool);
DER_Encoder& encode(u32bit);
- DER_Encoder& encode(const class BigInt&);
+ DER_Encoder& encode(const BigInt&);
DER_Encoder& encode(const MemoryRegion<byte>&, ASN1_Tag);
DER_Encoder& encode(const byte[], u32bit, ASN1_Tag);
DER_Encoder& encode(bool, ASN1_Tag, ASN1_Tag = CONTEXT_SPECIFIC);
DER_Encoder& encode(u32bit, ASN1_Tag, ASN1_Tag = CONTEXT_SPECIFIC);
- DER_Encoder& encode(const class BigInt&, ASN1_Tag,
+ DER_Encoder& encode(const BigInt&, ASN1_Tag,
ASN1_Tag = CONTEXT_SPECIFIC);
DER_Encoder& encode(const MemoryRegion<byte>&, ASN1_Tag,
ASN1_Tag, ASN1_Tag = CONTEXT_SPECIFIC);
@@ -62,7 +65,7 @@ class BOTAN_DLL DER_Encoder
return (*this);
}
- DER_Encoder& encode(const class ASN1_Object&);
+ DER_Encoder& encode(const ASN1_Object&);
DER_Encoder& encode_if(bool, DER_Encoder&);
DER_Encoder& add_object(ASN1_Tag, ASN1_Tag, const byte[], u32bit);
diff --git a/src/block/block_cipher.h b/src/block/block_cipher.h
index ff0a10103..11d5e20f9 100644
--- a/src/block/block_cipher.h
+++ b/src/block/block_cipher.h
@@ -58,7 +58,7 @@ class BOTAN_DLL BlockCipher : public SymmetricAlgorithm
/**
* Encrypt a block.
- * @param in The plaintext block to be encrypted as a byte array.
+ * @param block the plaintext block to be encrypted
* Must be of length BLOCK_SIZE. Will hold the result when the function
* has finished.
*/
@@ -66,7 +66,7 @@ class BOTAN_DLL BlockCipher : public SymmetricAlgorithm
/**
* Decrypt a block.
- * @param in The ciphertext block to be decrypted as a byte array.
+ * @param block the ciphertext block to be decrypted
* Must be of length BLOCK_SIZE. Will hold the result when the function
* has finished.
*/
diff --git a/src/cert/cvc/cvc_ado.h b/src/cert/cvc/cvc_ado.h
index 230ee8b8d..65a39fd91 100644
--- a/src/cert/cvc/cvc_ado.h
+++ b/src/cert/cvc/cvc_ado.h
@@ -41,6 +41,7 @@ class BOTAN_DLL EAC1_1_ADO : public EAC1_1_obj<EAC1_1_ADO>
* Create a signed CVC ADO request from to be signed (TBS) data
* @param signer the signer used to sign the CVC ADO request
* @param tbs_bits the TBS data to sign
+ * @param rng a random number generator
*/
static MemoryVector<byte> make_signed(
PK_Signer& signer,
diff --git a/src/cert/cvc/cvc_cert.h b/src/cert/cvc/cvc_cert.h
index 12bc41a9c..69d0d824a 100644
--- a/src/cert/cvc/cvc_cert.h
+++ b/src/cert/cvc/cvc_cert.h
@@ -92,7 +92,8 @@ inline bool operator!=(EAC1_1_CVC const& lhs, EAC1_1_CVC const& rhs)
* @param holder_auth_templ the holder authorization value byte to
* appear in the CHAT of the certificate
* @param ced the CED to appear in the certificate
-* @param ced the CEX to appear in the certificate
+* @param cex the CEX to appear in the certificate
+* @param rng a random number generator
*/
EAC1_1_CVC BOTAN_DLL make_cvc_cert(PK_Signer& signer,
const MemoryRegion<byte>& public_key,
diff --git a/src/cert/cvc/cvc_gen_cert.h b/src/cert/cvc/cvc_gen_cert.h
index f37684afd..61861df41 100644
--- a/src/cert/cvc/cvc_gen_cert.h
+++ b/src/cert/cvc/cvc_gen_cert.h
@@ -70,6 +70,7 @@ class EAC1_1_gen_CVC : public EAC1_1_obj<Derived> // CRTP continuation from EAC1
* Create a signed generalized CVC object.
* @param signer the signer used to sign this object
* @param tbs_bits the body the generalized CVC object to be signed
+ * @param rng a random number generator
* @result the DER encoded signed generalized CVC object
*/
static MemoryVector<byte> make_signed(
diff --git a/src/cert/cvc/cvc_self.h b/src/cert/cvc/cvc_self.h
index fb24ecd3a..f7bf6d5d8 100644
--- a/src/cert/cvc/cvc_self.h
+++ b/src/cert/cvc/cvc_self.h
@@ -97,7 +97,8 @@ namespace DE_EAC {
* shall be entitled to read the biometrical iris image
* @param fingerpr indicates whether the entity associated with the certificate
* shall be entitled to read the biometrical fingerprint image
-* @param rng the rng to use
+* @param cvca_validity_months length of time in months this will be valid
+* @param rng a random number generator
* @result the CVCA certificate created
*/
EAC1_1_CVC BOTAN_DLL create_cvca(Private_Key const& priv_key,
@@ -146,8 +147,10 @@ EAC1_1_Req BOTAN_DLL create_cvc_req(Private_Key const& priv_key,
* @param seqnr the sequence number of the certificate to be created
* @param seqnr_len the number of digits the sequence number will be
* encoded in
-* @param domestic indicates whether to sign a domestic or a foreign certificate:
-* set to true for domestic
+* @param domestic indicates whether to sign a domestic or a foreign
+* certificate: set to true for domestic
+* @param dvca_validity_months validity period in months
+* @param ca_is_validity_months validity period in months
* @param rng a random number generator
* @result the new certificate
*
diff --git a/src/cert/cvc/signed_obj.h b/src/cert/cvc/signed_obj.h
index 0e7dd6bdb..c0ae2cfc5 100644
--- a/src/cert/cvc/signed_obj.h
+++ b/src/cert/cvc/signed_obj.h
@@ -50,6 +50,7 @@ class BOTAN_DLL EAC_Signed_Object
/**
* Check the signature of this object.
* @param key the public key associated with this signed object
+ * @param sig the signature we are checking
* @return true if the signature was created by the private key
* associated with this public key
*/
@@ -59,9 +60,10 @@ class BOTAN_DLL EAC_Signed_Object
/**
* Write this object DER encoded into a specified pipe.
* @param pipe the pipe to write the encoded object to
- * @param enc the encoding type to use
+ * @param encoding the encoding type to use
*/
- virtual void encode(Pipe&, X509_Encoding = PEM) const = 0;
+ virtual void encode(Pipe& pipe,
+ X509_Encoding encoding = PEM) const = 0;
/**
* BER encode this object.
diff --git a/src/cert/x509/crl_ent.h b/src/cert/x509/crl_ent.h
index 050356c84..2b06189e4 100644
--- a/src/cert/x509/crl_ent.h
+++ b/src/cert/x509/crl_ent.h
@@ -49,7 +49,8 @@ class BOTAN_DLL CRL_Entry : public ASN1_Object
* @param cert the certificate to revoke
* @param reason the reason code to set in the entry
*/
- CRL_Entry(const X509_Certificate&, CRL_Code = UNSPECIFIED);
+ CRL_Entry(const X509_Certificate& cert,
+ CRL_Code reason = UNSPECIFIED);
private:
bool throw_on_unknown_critical;
diff --git a/src/cert/x509/x509_ca.h b/src/cert/x509/x509_ca.h
index 6eb4bbbef..6f36444ee 100644
--- a/src/cert/x509/x509_ca.h
+++ b/src/cert/x509/x509_ca.h
@@ -71,6 +71,7 @@ class BOTAN_DLL X509_CA
* @param signer a signing object
* @param rng a random number generator
* @param sig_algo the signature algorithm identifier
+ * @param pub_key the serialized public key
* @param not_before the start time of the certificate
* @param not_after the end time of the certificate
* @param issuer_dn the DN of the issuer
@@ -92,6 +93,7 @@ class BOTAN_DLL X509_CA
* Create a new CA object.
* @param ca_certificate the certificate of the CA
* @param key the private key of the CA
+ * @param hash_fn name of a hash function to use for signing
*/
X509_CA(const X509_Certificate& ca_certificate,
const Private_Key& key,
diff --git a/src/cert/x509/x509_crl.h b/src/cert/x509/x509_crl.h
index a7903e7e6..74427fbef 100644
--- a/src/cert/x509/x509_crl.h
+++ b/src/cert/x509/x509_crl.h
@@ -68,12 +68,16 @@ class BOTAN_DLL X509_CRL : public X509_Object
/**
* Construct a CRL from a data source.
* @param source the data source providing the DER or PEM encoded CRL.
+ * @param throw_on_unknown_critical should we throw an exception
+ * if an unknown CRL extension marked as critical is encountered.
*/
- X509_CRL(DataSource&, bool throw_on_unknown_critical = false);
+ X509_CRL(DataSource& source, bool throw_on_unknown_critical = false);
/**
* Construct a CRL from a file containing the DER or PEM encoded CRL.
* @param filename the name of the CRL file
+ * @param throw_on_unknown_critical should we throw an exception
+ * if an unknown CRL extension marked as critical is encountered.
*/
X509_CRL(const std::string& filename,
bool throw_on_unknown_critical = false);
diff --git a/src/constructs/passhash/passhash9.h b/src/constructs/passhash/passhash9.h
index 6020dce42..8900d55d3 100644
--- a/src/constructs/passhash/passhash9.h
+++ b/src/constructs/passhash/passhash9.h
@@ -16,7 +16,7 @@ namespace Botan {
* Create a password hash using PBKDF2
* @param password the password
* @param rng a random number generator
-* @Param work_factor how much work to do to slow down guessing attacks
+* @param work_factor how much work to do to slow down guessing attacks
*/
std::string BOTAN_DLL generate_passhash9(const std::string& password,
RandomNumberGenerator& rng,
diff --git a/src/filters/data_snk.h b/src/filters/data_snk.h
index 61ddf6e0d..db0bfc858 100644
--- a/src/filters/data_snk.h
+++ b/src/filters/data_snk.h
@@ -45,11 +45,11 @@ class BOTAN_DLL DataSink_Stream : public DataSink
/**
* Construct a DataSink_Stream from a stream.
- * @param file the name of the file to open a stream to
+ * @param pathname the name of the file to open a stream to
* @param use_binary indicates whether to treat the file
* as a binary file or not
*/
- DataSink_Stream(const std::string& filename,
+ DataSink_Stream(const std::string& pathname,
bool use_binary = false);
~DataSink_Stream();
diff --git a/src/filters/data_src.h b/src/filters/data_src.h
index e16217e0f..c69aa84b0 100644
--- a/src/filters/data_src.h
+++ b/src/filters/data_src.h
@@ -21,8 +21,9 @@ class BOTAN_DLL DataSource
{
public:
/**
- * Read from the source. Moves the internal offset so that
- * every call to read will return a new portion of the source.
+ * Read from the source. Moves the internal offset so that every
+ * call to read will return a new portion of the source.
+ *
* @param out the byte array to write the result to
* @param length the length of the byte array out
* @return the length in bytes that was actually read and put
@@ -31,11 +32,13 @@ class BOTAN_DLL DataSource
virtual u32bit read(byte out[], u32bit length) = 0;
/**
- * Read from the source but do not modify the internal offset. Consecutive
- * calls to peek() will return portions of the source starting at the same
- * position.
+ * Read from the source but do not modify the internal
+ * offset. Consecutive calls to peek() will return portions of
+ * the source starting at the same position.
+ *
* @param out the byte array to write the output to
* @param length the length of the byte array out
+ * @param peek_offset the offset into the stream to read at
* @return the length in bytes that was actually read and put
* into out
*/
@@ -49,13 +52,13 @@ class BOTAN_DLL DataSource
virtual bool end_of_data() const = 0;
/**
* return the id of this data source
- * @return the std::string representing the id of this data source
+ * @return std::string representing the id of this data source
*/
virtual std::string id() const { return ""; }
/**
* Read one byte.
- * @param the byte to read to
+ * @param out the byte to read to
* @return the length in bytes that was actually read and put
* into out
*/
@@ -63,7 +66,7 @@ class BOTAN_DLL DataSource
/**
* Peek at one byte.
- * @param the byte to read to
+ * @param out an output byte
* @return the length in bytes that was actually read and put
* into out
*/
diff --git a/src/filters/filters.h b/src/filters/filters.h
index 208332a56..6c78f77aa 100644
--- a/src/filters/filters.h
+++ b/src/filters/filters.h
@@ -160,8 +160,8 @@ class BOTAN_DLL MAC_Filter : public Keyed_Filter
/**
* Construct a MAC filter. The MAC key will be left empty.
- * @param mac the MAC to use
- * @param len the output length of this filter. Leave the default
+ * @param mac_obj the MAC to use
+ * @param out_len the output length of this filter. Leave the default
* value 0 if you want to use the full output of the
* MAC. Otherwise, specify a smaller value here so that the
* output of the MAC will be cut off.
@@ -174,9 +174,9 @@ class BOTAN_DLL MAC_Filter : public Keyed_Filter
/**
* Construct a MAC filter.
- * @param mac the MAC to use
+ * @param mac_obj the MAC to use
* @param key the MAC key to use
- * @param len the output length of this filter. Leave the default
+ * @param out_len the output length of this filter. Leave the default
* value 0 if you want to use the full output of the
* MAC. Otherwise, specify a smaller value here so that the
* output of the MAC will be cut off.
diff --git a/src/filters/key_filt.h b/src/filters/key_filt.h
index 36af91f88..6f3d23fcd 100644
--- a/src/filters/key_filt.h
+++ b/src/filters/key_filt.h
@@ -30,7 +30,7 @@ class BOTAN_DLL Keyed_Filter : public Filter
* Set the initialization vector of this filter.
* @param iv the initialization vector to set
*/
- virtual void set_iv(const InitializationVector&) {}
+ virtual void set_iv(const InitializationVector& iv) {}
/**
* Check whether a key length is valid for this filter.
diff --git a/src/filters/modes/cbc/cbc.h b/src/filters/modes/cbc/cbc.h
index 6d9092041..e51a94eac 100644
--- a/src/filters/modes/cbc/cbc.h
+++ b/src/filters/modes/cbc/cbc.h
@@ -24,7 +24,7 @@ class BOTAN_DLL CBC_Encryption : public Keyed_Filter,
public:
std::string name() const;
- void set_iv(const InitializationVector&);
+ void set_iv(const InitializationVector& iv);
void set_key(const SymmetricKey& key) { cipher->set_key(key); }
@@ -61,7 +61,7 @@ class BOTAN_DLL CBC_Decryption : public Keyed_Filter,
public:
std::string name() const;
- void set_iv(const InitializationVector&);
+ void set_iv(const InitializationVector& iv);
void set_key(const SymmetricKey& key) { cipher->set_key(key); }
diff --git a/src/filters/pbe.h b/src/filters/pbe.h
index f06d593d0..9add98872 100644
--- a/src/filters/pbe.h
+++ b/src/filters/pbe.h
@@ -25,16 +25,17 @@ class BOTAN_DLL PBE : public Filter
* Set this filter's key.
* @param pw the password to be used for the encryption
*/
- virtual void set_key(const std::string&) = 0;
+ virtual void set_key(const std::string& pw) = 0;
/**
* Create a new random salt value and set the default iterations value.
+ * @param rng a random number generator
*/
virtual void new_params(RandomNumberGenerator& rng) = 0;
/**
* DER encode the params (the number of iterations and the salt value)
- * @return the encoded params
+ * @return encoded params
*/
virtual MemoryVector<byte> encode_params() const = 0;
@@ -42,11 +43,11 @@ class BOTAN_DLL PBE : public Filter
* Decode params and use them inside this Filter.
* @param src a data source to read the encoded params from
*/
- virtual void decode_params(DataSource&) = 0;
+ virtual void decode_params(DataSource& src) = 0;
/**
* Get this PBE's OID.
- * @return the OID
+ * @return object identifier
*/
virtual OID get_oid() const = 0;
};
diff --git a/src/filters/pipe.h b/src/filters/pipe.h
index 9af21a13f..12d7716f1 100644
--- a/src/filters/pipe.h
+++ b/src/filters/pipe.h
@@ -107,6 +107,7 @@ class BOTAN_DLL Pipe : public DataSource
* Read the default message from the pipe. Moves the internal
* offset so that every call to read will return a new portion of
* the message.
+ *
* @param output the byte array to write the read bytes to
* @param length the length of the byte array output
* @return the number of bytes actually read into output
@@ -125,9 +126,12 @@ class BOTAN_DLL Pipe : public DataSource
u32bit read(byte output[], u32bit length, message_id msg);
/**
- * Read a single byte from the pipe. Moves the internal offset so that
- * every call to read will return a new portion of the message.
+ * Read a single byte from the pipe. Moves the internal offset so
+ * that every call to read will return a new portion of the
+ * message.
+ *
* @param output the byte to write the result to
+ * @param msg the message to read from
* @return the number of bytes actually read into output
*/
u32bit read(byte& output, message_id msg = DEFAULT_MESSAGE);
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);
diff --git a/src/mac/mac.cpp b/src/mac/mac.cpp
index a2c884ab6..cb89e872a 100644
--- a/src/mac/mac.cpp
+++ b/src/mac/mac.cpp
@@ -9,7 +9,7 @@
namespace Botan {
-/**
+/*
* Default (deterministic) MAC verification operation
*/
bool MessageAuthenticationCode::verify_mac(const byte mac[], u32bit length)
diff --git a/src/mac/mac.h b/src/mac/mac.h
index 617e86358..b93ae473d 100644
--- a/src/mac/mac.h
+++ b/src/mac/mac.h
@@ -24,10 +24,10 @@ class BOTAN_DLL MessageAuthenticationCode : public BufferedComputation,
/**
* Verify a MAC.
* @param in the MAC to verify as a byte array
- * @param length the length of the byte array
+ * @param length the length of param in
* @return true if the MAC is valid, false otherwise
*/
- virtual bool verify_mac(const byte[], u32bit);
+ virtual bool verify_mac(const byte in[], u32bit length);
/**
* Get a new object representing the same algorithm as *this
diff --git a/src/math/bigint/bigint.h b/src/math/bigint/bigint.h
index 0bb51fd20..cd1aebf00 100644
--- a/src/math/bigint/bigint.h
+++ b/src/math/bigint/bigint.h
@@ -361,14 +361,21 @@ class BOTAN_DLL BigInt
*/
void binary_decode(const MemoryRegion<byte>& buf);
- u32bit encoded_size(Base = Binary) const;
+ /**
+ * @param base the base to measure the size for
+ * @return size of this integer in base base
+ */
+ u32bit encoded_size(Base base = Binary) const;
/**
- @param rng a random number generator
- @result a random integer between min and max
+ * @param rng a random number generator
+ * @param min the minimum value
+ * @param max the maximum value
+ * @return a random integer between min and max
*/
static BigInt random_integer(RandomNumberGenerator& rng,
- const BigInt& min, const BigInt& max);
+ const BigInt& min,
+ const BigInt& max);
/**
* Encode the integer value from a BigInt to a SecureVector of bytes
diff --git a/src/pbe/get_pbe.h b/src/pbe/get_pbe.h
index 04eda6696..73c53497c 100644
--- a/src/pbe/get_pbe.h
+++ b/src/pbe/get_pbe.h
@@ -16,17 +16,18 @@ namespace Botan {
/**
* Factory function for PBEs.
* @param algo_spec the name of the PBE algorithm to retrieve
-* @return a pointer to a PBE with randomly created parameters
+* @return pointer to a PBE with randomly created parameters
*/
-BOTAN_DLL PBE* get_pbe(const std::string&);
+BOTAN_DLL PBE* get_pbe(const std::string& algo_spec);
/**
* Factory function for PBEs.
* @param pbe_oid the oid of the desired PBE
* @param params a DataSource providing the DER encoded parameters to use
-* @return a pointer to the PBE with the specified parameters
+* @return pointer to the PBE with the specified parameters
*/
-BOTAN_DLL PBE* get_pbe(const OID&, DataSource&);
+BOTAN_DLL PBE* get_pbe(const OID& pbe_oid,
+ DataSource& params);
}
diff --git a/src/pubkey/dh/dh.h b/src/pubkey/dh/dh.h
index 738b3f9c4..88b57922d 100644
--- a/src/pubkey/dh/dh.h
+++ b/src/pubkey/dh/dh.h
@@ -56,7 +56,7 @@ class BOTAN_DLL DH_PrivateKey : public DH_PublicKey,
* Load a DH private key
* @param alg_id the algorithm id
* @param key_bits the subject public key
- * @rng a random number generator
+ * @param rng a random number generator
*/
DH_PrivateKey(const AlgorithmIdentifier& alg_id,
const MemoryRegion<byte>& key_bits,
diff --git a/src/pubkey/ecdh/ecdh.h b/src/pubkey/ecdh/ecdh.h
index 19621f2ca..ea1205a48 100644
--- a/src/pubkey/ecdh/ecdh.h
+++ b/src/pubkey/ecdh/ecdh.h
@@ -75,7 +75,8 @@ class BOTAN_DLL ECDH_PrivateKey : public ECDH_PublicKey,
/**
* Generate a new private key
- * @param the domain parameters to used for this key
+ * @param rng a random number generator
+ * @param domain parameters to used for this key
*/
ECDH_PrivateKey(RandomNumberGenerator& rng,
const EC_Domain_Params& domain) :
diff --git a/src/pubkey/ecdsa/ecdsa.h b/src/pubkey/ecdsa/ecdsa.h
index 62bd007f9..5e10c837d 100644
--- a/src/pubkey/ecdsa/ecdsa.h
+++ b/src/pubkey/ecdsa/ecdsa.h
@@ -72,7 +72,8 @@ class BOTAN_DLL ECDSA_PrivateKey : public ECDSA_PublicKey,
/**
* Generate a new private key
- * @param the domain parameters to used for this key
+ * @param rng a random number generator
+ * @param domain parameters to used for this key
*/
ECDSA_PrivateKey(RandomNumberGenerator& rng,
const EC_Domain_Params& domain) :
@@ -83,7 +84,8 @@ class BOTAN_DLL ECDSA_PrivateKey : public ECDSA_PublicKey,
* @param domain parameters
* @param x the private key
*/
- ECDSA_PrivateKey(const EC_Domain_Params& domain, const BigInt& x) :
+ ECDSA_PrivateKey(const EC_Domain_Params& domain,
+ const BigInt& x) :
EC_PrivateKey(domain, x) {}
bool check_key(RandomNumberGenerator& rng, bool) const;
diff --git a/src/pubkey/gost_3410/gost_3410.h b/src/pubkey/gost_3410/gost_3410.h
index 36fa2912d..5148b0204 100644
--- a/src/pubkey/gost_3410/gost_3410.h
+++ b/src/pubkey/gost_3410/gost_3410.h
@@ -78,7 +78,8 @@ class BOTAN_DLL GOST_3410_PrivateKey : public GOST_3410_PublicKey,
/**
* Generate a new private key
- * @param the domain parameters to used for this key
+ * @param rng a random number generator
+ * @param domain parameters to used for this key
*/
GOST_3410_PrivateKey(RandomNumberGenerator& rng,
const EC_Domain_Params& domain) :
diff --git a/src/pubkey/pk_keys.h b/src/pubkey/pk_keys.h
index da73db0ee..781c8e70f 100644
--- a/src/pubkey/pk_keys.h
+++ b/src/pubkey/pk_keys.h
@@ -40,7 +40,7 @@ class BOTAN_DLL Public_Key
* of the test
* @return true if the test is passed
*/
- virtual bool check_key(RandomNumberGenerator&, bool) const
+ virtual bool check_key(RandomNumberGenerator& rng, bool strong) const
{ return true; }
/**
diff --git a/src/pubkey/pubkey.h b/src/pubkey/pubkey.h
index d94b3e2e4..f6a120654 100644
--- a/src/pubkey/pubkey.h
+++ b/src/pubkey/pubkey.h
@@ -145,7 +145,7 @@ class BOTAN_DLL PK_Signer
/**
* Add a message part (single byte).
- * @param the byte to add
+ * @param in the byte to add
*/
void update(byte in) { update(&in, 1); }
diff --git a/src/pubkey/x509_key.h b/src/pubkey/x509_key.h
index d9e9f2d7c..4ac6eab3d 100644
--- a/src/pubkey/x509_key.h
+++ b/src/pubkey/x509_key.h
@@ -23,42 +23,42 @@ namespace X509 {
/**
* BER encode a key
* @param key the public key to encode
-* @return the BER encoding of this key
+* @return BER encoding of this key
*/
BOTAN_DLL MemoryVector<byte> BER_encode(const Public_Key& key);
/**
* PEM encode a public key into a string.
* @param key the key to encode
-* @return the PEM encoded key
+* @return PEM encoded key
*/
BOTAN_DLL std::string PEM_encode(const Public_Key& key);
/**
* Create a public key from a data source.
* @param source the source providing the DER or PEM encoded key
-* @return the new public key object
+* @return new public key object
*/
BOTAN_DLL Public_Key* load_key(DataSource& source);
/**
* Create a public key from a file
-* @param file pathname to the file to load
-* @return the new public key object
+* @param filename pathname to the file to load
+* @return new public key object
*/
BOTAN_DLL Public_Key* load_key(const std::string& filename);
/**
* Create a public key from a memory region.
* @param enc the memory region containing the DER or PEM encoded key
-* @return the new public key object
+* @return new public key object
*/
BOTAN_DLL Public_Key* load_key(const MemoryRegion<byte>& enc);
/**
* Copy a key.
* @param key the public key to copy
-* @return the new public key object
+* @return new public key object
*/
BOTAN_DLL Public_Key* copy_key(const Public_Key& key);
@@ -68,7 +68,7 @@ BOTAN_DLL Public_Key* copy_key(const Public_Key& key);
* constraints to be placed in the return value is derived
* @param limits additional limits that will be incorporated into the
* return value
-* @return the combination of key type specific constraints and
+* @return combination of key type specific constraints and
* additional limits
*/
BOTAN_DLL Key_Constraints find_constraints(const Public_Key& pub_key,
diff --git a/src/s2k/pbkdf1/pbkdf1.h b/src/s2k/pbkdf1/pbkdf1.h
index 053a2dbe1..cf439efd8 100644
--- a/src/s2k/pbkdf1/pbkdf1.h
+++ b/src/s2k/pbkdf1/pbkdf1.h
@@ -29,7 +29,7 @@ class BOTAN_DLL PKCS5_PBKDF1 : public S2K
/**
* Create a PKCS #5 instance using the specified hash function.
- * @param hash a pointer to a hash function object to use
+ * @param hash_in pointer to a hash function object to use
*/
PKCS5_PBKDF1(HashFunction* hash_in) : hash(hash_in) {}
diff --git a/src/ssl/rec_read.cpp b/src/ssl/rec_read.cpp
index 8b655f5bc..3c008641d 100644
--- a/src/ssl/rec_read.cpp
+++ b/src/ssl/rec_read.cpp
@@ -12,7 +12,7 @@
namespace Botan {
-/**
+/*
* Reset the state
*/
void Record_Reader::reset()
@@ -26,7 +26,7 @@ void Record_Reader::reset()
seq_no = 0;
}
-/**
+/*
* Set the version to use
*/
void Record_Reader::set_version(Version_Code version)
@@ -38,7 +38,7 @@ void Record_Reader::set_version(Version_Code version)
minor = (version & 0xFF);
}
-/**
+/*
* Set the keys for reading
*/
void Record_Reader::set_keys(const CipherSuite& suite, const SessionKeys& keys,
@@ -106,7 +106,7 @@ void Record_Reader::add_input(const byte input[], u32bit input_size)
input_queue.write(input, input_size);
}
-/**
+/*
* Retrieve the next record
*/
u32bit Record_Reader::get_record(byte& msg_type,
diff --git a/src/stream/stream_cipher.h b/src/stream/stream_cipher.h
index 11b741a1a..c5d115a5d 100644
--- a/src/stream/stream_cipher.h
+++ b/src/stream/stream_cipher.h
@@ -39,7 +39,7 @@ class BOTAN_DLL StreamCipher : public SymmetricAlgorithm
* @param iv the initialization vector
* @param iv_len the length of the IV in bytes
*/
- virtual void set_iv(const byte[], u32bit iv_len)
+ virtual void set_iv(const byte iv[], u32bit iv_len)
{
if(iv_len)
throw Invalid_Argument("The stream cipher " + name() +
diff --git a/src/stream/turing/turing.h b/src/stream/turing/turing.h
index 19d151fca..f9b4460ef 100644
--- a/src/stream/turing/turing.h
+++ b/src/stream/turing/turing.h
@@ -19,7 +19,7 @@ class BOTAN_DLL Turing : public StreamCipher
{
public:
void cipher(const byte in[], byte out[], u32bit length);
- void set_iv(const byte[], u32bit);
+ void set_iv(const byte iv[], u32bit iv_length);
bool valid_iv_length(u32bit iv_len) const
{ return (iv_len % 4 == 0 && iv_len <= 16); }
diff --git a/src/sym_algo/sym_algo.h b/src/sym_algo/sym_algo.h
index 20bbd649f..f00c8cedf 100644
--- a/src/sym_algo/sym_algo.h
+++ b/src/sym_algo/sym_algo.h
@@ -52,7 +52,7 @@ class BOTAN_DLL SymmetricAlgorithm
/**
* Set the symmetric key of this object.
* @param key the to be set as a byte array.
- * @param the length of the byte array.
+ * @param length in bytes of key param
*/
void set_key(const byte key[], u32bit length)
{
diff --git a/src/utils/buf_comp/buf_comp.h b/src/utils/buf_comp/buf_comp.h
index 6c1acb520..bbaa72919 100644
--- a/src/utils/buf_comp/buf_comp.h
+++ b/src/utils/buf_comp/buf_comp.h
@@ -29,7 +29,7 @@ class BOTAN_DLL BufferedComputation
/**
* Add new input to process.
* @param in the input to process as a byte array
- * @param the length of the byte array
+ * @param length of param in in bytes
*/
void update(const byte in[], u32bit length) { add_data(in, length); }