From 416695f7363c4e93eaeaea23427a1fed3ad73cab Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 15 Jun 2010 21:59:23 +0000 Subject: Fix a few hundred Doxygen warnings --- src/libstate/libstate.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstate/libstate.h') 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. -- cgit v1.2.3 From 76b57a7c4656f0f5759c34efe8bab664b49cd21d Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 15 Jun 2010 23:23:49 +0000 Subject: More Doxygen updates/fixes --- src/cert/cvc/eac_obj.h | 2 +- src/cert/cvc/ecdsa_sig.h | 3 ++ src/cert/x509/certstor.h | 2 +- src/cert/x509/x509_ext.h | 50 +++++++++++++++++++++++--------- src/cert/x509/x509find.h | 6 ++-- src/cert/x509/x509stor.h | 31 ++++++++++---------- src/checksum/adler32/adler32.h | 4 +-- src/checksum/crc24/crc24.h | 4 +-- src/checksum/crc32/crc32.h | 4 +-- src/cms/cms_dec.h | 2 +- src/cms/cms_enc.h | 2 +- src/constructs/tss/tss.h | 3 ++ src/engine/aes_isa_eng/aes_isa_engine.h | 4 +++ src/engine/amd64_eng/amd64_engine.h | 3 ++ src/engine/def_engine/default_engine.h | 2 +- src/engine/engine.h | 2 +- src/engine/gnump/gmp_wrap.h | 4 +-- src/engine/gnump/gnump_engine.h | 4 +-- src/engine/ia32_eng/ia32_engine.h | 3 ++ src/engine/openssl/bn_wrap.h | 8 ++--- src/engine/openssl/openssl_engine.h | 2 +- src/engine/simd_engine/simd_engine.h | 3 ++ src/entropy/dev_random/dev_random.h | 3 ++ src/entropy/entropy_src.h | 3 ++ src/entropy/hres_timer/hres_timer.h | 4 +-- src/entropy/proc_walk/es_ftw.h | 4 ++- src/filters/buf_filt.h | 4 +++ src/filters/bzip2/bzip2.cpp | 4 +-- src/filters/bzip2/bzip2.h | 4 +-- src/filters/filter.h | 2 +- src/filters/modes/cbc/cbc.h | 4 +-- src/filters/modes/cfb/cfb.h | 4 +-- src/filters/modes/cts/cts.h | 8 ++--- src/filters/modes/eax/eax.h | 6 ++-- src/filters/modes/ecb/ecb.h | 4 +-- src/filters/out_buf.h | 2 +- src/filters/pipe.h | 5 +++- src/filters/pk_filts/pk_filts.h | 8 ++--- src/filters/secqueue.cpp | 8 +++-- src/filters/secqueue.h | 4 +-- src/filters/zlib/zlib.cpp | 4 +-- src/filters/zlib/zlib.h | 4 +-- src/hash/bmw/bmw_512.h | 3 ++ src/hash/gost_3411/gost_3411.h | 2 +- src/hash/md2/md2.h | 2 +- src/hash/md4/md4.h | 2 +- src/hash/md4_ia32/md4_ia32.h | 4 +-- src/hash/md5_ia32/md5_ia32.h | 4 +-- src/hash/mdx_hash/mdx_hash.h | 10 +++++-- src/hash/par_hash/par_hash.h | 4 +-- src/hash/rmd128/rmd128.h | 4 +-- src/hash/rmd160/rmd160.h | 2 +- src/hash/sha1/sha160.h | 4 +-- src/hash/sha1_amd64/sha1_amd64.h | 4 +-- src/hash/sha1_ia32/sha1_ia32.h | 4 +-- src/hash/sha1_sse2/sha1_sse2.h | 4 +-- src/hash/sha2/sha2_32.h | 8 ++--- src/hash/sha2/sha2_64.h | 8 ++--- src/hash/skein/skein_512.h | 3 ++ src/hash/tiger/tiger.h | 2 +- src/hash/whirlpool/whrlpool.h | 2 +- src/kdf/kdf.h | 4 +-- src/kdf/kdf1/kdf1.h | 4 +-- src/kdf/kdf2/kdf2.h | 4 +-- src/kdf/mgf1/mgf1.h | 4 +-- src/kdf/ssl_prf/prf_ssl3.h | 4 +-- src/kdf/tls_prf/prf_tls.h | 8 ++--- src/kdf/x942_prf/prf_x942.h | 4 +-- src/libstate/libstate.h | 4 +-- src/mac/cbc_mac/cbc_mac.h | 2 +- src/mac/cmac/cmac.h | 4 +-- src/mac/ssl3mac/ssl3_mac.h | 4 +-- src/math/numbertheory/def_powm.h | 4 +-- src/math/numbertheory/point_gfp.h | 7 +++++ src/math/numbertheory/pow_mod.h | 8 ++--- src/math/numbertheory/reducer.h | 9 +++++- src/mutex/mutex.h | 23 ++++++++++++--- src/mutex/noop_mutex/mux_noop.h | 2 +- src/mutex/pthreads/mux_pthr.h | 2 +- src/mutex/qt_mutex/mux_qt.h | 2 +- src/mutex/win32_crit_section/mux_win32.h | 2 +- src/pbe/pbes1/pbes1.h | 4 +-- src/pbe/pbes2/pbes2.h | 4 +-- src/pk_pad/eme.h | 2 +- src/pk_pad/eme1/eme1.h | 4 +-- src/pk_pad/eme_pkcs/eme_pkcs.h | 4 +-- src/pk_pad/emsa.h | 2 +- src/pk_pad/emsa1/emsa1.h | 5 ++-- src/pk_pad/emsa2/emsa2.h | 5 ++-- src/pk_pad/emsa3/emsa3.h | 2 +- src/pk_pad/emsa4/emsa4.h | 4 +-- src/pk_pad/emsa_raw/emsa_raw.h | 5 ++-- src/pubkey/blinding.h | 2 +- src/pubkey/dlies/dlies.h | 4 +-- src/pubkey/dsa/dsa.h | 10 +++++-- src/pubkey/ec_dompar/ec_dompar.h | 3 ++ src/pubkey/ecdsa/ecdsa.h | 6 ++++ src/pubkey/elgamal/elgamal.h | 10 +++++-- src/pubkey/gost_3410/gost_3410.h | 10 +++++-- src/pubkey/nr/nr.h | 10 +++++-- src/pubkey/pk_ops.h | 16 ++++++++-- src/pubkey/pubkey.h | 4 +-- src/pubkey/rsa/rsa.h | 8 ++++- src/pubkey/rw/rw.h | 10 +++++-- src/rng/auto_rng/auto_rng.h | 3 ++ src/rng/rng.h | 4 +-- src/s2k/pgps2k/pgp_s2k.h | 4 +-- src/s2k/s2k.h | 5 ++-- src/ssl/tls_reader.h | 3 ++ src/stream/arc4/arc4.h | 4 +-- src/stream/ctr/ctr.h | 4 +-- src/stream/ofb/ofb.h | 4 +-- src/stream/salsa20/salsa20.h | 4 +-- src/stream/stream_cipher.h | 4 +-- src/stream/turing/turing.h | 2 +- src/stream/wid_wake/wid_wake.h | 5 +++- src/sym_algo/symkey.h | 2 +- src/utils/cpuid.h | 3 ++ src/utils/datastor/datastor.h | 3 ++ src/utils/exceptn.h | 34 +++++++++++----------- src/utils/simd_32/simd_scalar.h | 4 +++ src/utils/stl_util.h | 6 ++-- src/utils/ui.h | 3 +- 123 files changed, 417 insertions(+), 236 deletions(-) (limited to 'src/libstate/libstate.h') diff --git a/src/cert/cvc/eac_obj.h b/src/cert/cvc/eac_obj.h index 66752b10c..eb6db3369 100644 --- a/src/cert/cvc/eac_obj.h +++ b/src/cert/cvc/eac_obj.h @@ -13,7 +13,7 @@ namespace Botan { -/* +/** * TR03110 v1.1 EAC CV Certificate */ template // CRTP is used enable the call sequence: diff --git a/src/cert/cvc/ecdsa_sig.h b/src/cert/cvc/ecdsa_sig.h index 1397a92b1..a92052470 100644 --- a/src/cert/cvc/ecdsa_sig.h +++ b/src/cert/cvc/ecdsa_sig.h @@ -15,6 +15,9 @@ namespace Botan { +/** +* Class representing an ECDSA signature +*/ class BOTAN_DLL ECDSA_Signature { public: diff --git a/src/cert/x509/certstor.h b/src/cert/x509/certstor.h index d5004e366..2e39a7178 100644 --- a/src/cert/x509/certstor.h +++ b/src/cert/x509/certstor.h @@ -13,7 +13,7 @@ namespace Botan { -/* +/** * Certificate Store Interface */ class BOTAN_DLL Certificate_Store diff --git a/src/cert/x509/x509_ext.h b/src/cert/x509/x509_ext.h index a5bfd357f..213a077a2 100644 --- a/src/cert/x509/x509_ext.h +++ b/src/cert/x509/x509_ext.h @@ -16,18 +16,40 @@ namespace Botan { -/* +/** * X.509 Certificate Extension */ class BOTAN_DLL Certificate_Extension { public: + /** + * @return OID representing this extension + */ OID oid_of() const; + /** + * Make a copy of this extension + * @return copy of this + */ virtual Certificate_Extension* copy() const = 0; - virtual void contents_to(Data_Store&, Data_Store&) const = 0; + /* + * Add the contents of this extension into the information + * for the subject and/or issuer, as necessary. + * @param subject the subject info + * @param issuer the issuer info + */ + virtual void contents_to(Data_Store& subject, + Data_Store& issuer) const = 0; + + /* + * @return short readable name + */ virtual std::string config_id() const = 0; + + /* + * @return specific OID name + */ virtual std::string oid_name() const = 0; virtual ~Certificate_Extension() {} @@ -38,7 +60,7 @@ class BOTAN_DLL Certificate_Extension virtual void decode_inner(const MemoryRegion&) = 0; }; -/* +/** * X.509 Certificate Extension List */ class BOTAN_DLL Extensions : public ASN1_Object @@ -65,7 +87,7 @@ class BOTAN_DLL Extensions : public ASN1_Object namespace Cert_Extension { -/* +/** * Basic Constraints Extension */ class BOTAN_DLL Basic_Constraints : public Certificate_Extension @@ -91,7 +113,7 @@ class BOTAN_DLL Basic_Constraints : public Certificate_Extension u32bit path_limit; }; -/* +/** * Key Usage Constraints Extension */ class BOTAN_DLL Key_Usage : public Certificate_Extension @@ -114,7 +136,7 @@ class BOTAN_DLL Key_Usage : public Certificate_Extension Key_Constraints constraints; }; -/* +/** * Subject Key Identifier Extension */ class BOTAN_DLL Subject_Key_ID : public Certificate_Extension @@ -138,7 +160,7 @@ class BOTAN_DLL Subject_Key_ID : public Certificate_Extension MemoryVector key_id; }; -/* +/** * Authority Key Identifier Extension */ class BOTAN_DLL Authority_Key_ID : public Certificate_Extension @@ -162,7 +184,7 @@ class BOTAN_DLL Authority_Key_ID : public Certificate_Extension MemoryVector key_id; }; -/* +/** * Alternative Name Extension Base Class */ class BOTAN_DLL Alternative_Name : public Certificate_Extension @@ -188,7 +210,7 @@ class BOTAN_DLL Alternative_Name : public Certificate_Extension AlternativeName alt_name; }; -/* +/** * Subject Alternative Name Extension */ class BOTAN_DLL Subject_Alternative_Name : public Alternative_Name @@ -200,7 +222,7 @@ class BOTAN_DLL Subject_Alternative_Name : public Alternative_Name Subject_Alternative_Name(const AlternativeName& = AlternativeName()); }; -/* +/** * Issuer Alternative Name Extension */ class BOTAN_DLL Issuer_Alternative_Name : public Alternative_Name @@ -212,7 +234,7 @@ class BOTAN_DLL Issuer_Alternative_Name : public Alternative_Name Issuer_Alternative_Name(const AlternativeName& = AlternativeName()); }; -/* +/** * Extended Key Usage Extension */ class BOTAN_DLL Extended_Key_Usage : public Certificate_Extension @@ -236,7 +258,7 @@ class BOTAN_DLL Extended_Key_Usage : public Certificate_Extension std::vector oids; }; -/* +/** * Certificate Policies Extension */ class BOTAN_DLL Certificate_Policies : public Certificate_Extension @@ -261,7 +283,7 @@ class BOTAN_DLL Certificate_Policies : public Certificate_Extension std::vector oids; }; -/* +/** * CRL Number Extension */ class BOTAN_DLL CRL_Number : public Certificate_Extension @@ -286,7 +308,7 @@ class BOTAN_DLL CRL_Number : public Certificate_Extension u32bit crl_number; }; -/* +/** * CRL Entry Reason Code Extension */ class BOTAN_DLL CRL_ReasonCode : public Certificate_Extension diff --git a/src/cert/x509/x509find.h b/src/cert/x509/x509find.h index a7a84c7a5..5624b717b 100644 --- a/src/cert/x509/x509find.h +++ b/src/cert/x509/x509find.h @@ -12,7 +12,7 @@ namespace Botan { -/* +/** * Search based on the contents of a DN entry */ class BOTAN_DLL DN_Check : public X509_Store::Search_Func @@ -30,7 +30,7 @@ class BOTAN_DLL DN_Check : public X509_Store::Search_Func compare_fn compare; }; -/* +/** * Search for a certificate by issuer/serial */ class BOTAN_DLL IandS_Match : public X509_Store::Search_Func @@ -43,7 +43,7 @@ class BOTAN_DLL IandS_Match : public X509_Store::Search_Func MemoryVector serial; }; -/* +/** * Search for a certificate by subject keyid */ class BOTAN_DLL SKID_Match : public X509_Store::Search_Func diff --git a/src/cert/x509/x509stor.h b/src/cert/x509/x509stor.h index 4e6037883..7c3895635 100644 --- a/src/cert/x509/x509stor.h +++ b/src/cert/x509/x509stor.h @@ -14,7 +14,7 @@ namespace Botan { -/* +/** * X.509 Certificate Validation Result */ enum X509_Code { @@ -42,12 +42,15 @@ enum X509_Code { CA_CERT_NOT_FOR_CRL_ISSUER }; -/* +/** * X.509 Certificate Store */ class BOTAN_DLL X509_Store { public: + /** + * A callback for searching the store + */ class BOTAN_DLL Search_Func { public: @@ -71,20 +74,6 @@ class BOTAN_DLL X509_Store std::vector get_cert_chain(const X509_Certificate&); std::string PEM_encode() const; - /* - * Made CRL_Data public for XLC for Cell 0.9, otherwise cannot - * instantiate member variable std::vector revoked - */ - class BOTAN_DLL CRL_Data - { - public: - X509_DN issuer; - MemoryVector serial, auth_key_id; - bool operator==(const CRL_Data&) const; - bool operator!=(const CRL_Data&) const; - bool operator<(const CRL_Data&) const; - }; - X509_Code add_crl(const X509_CRL&); void add_cert(const X509_Certificate&, bool = false); void add_certs(DataSource&); @@ -102,6 +91,16 @@ class BOTAN_DLL X509_Store private: X509_Store& operator=(const X509_Store&) { return (*this); } + class BOTAN_DLL CRL_Data + { + public: + X509_DN issuer; + MemoryVector serial, auth_key_id; + bool operator==(const CRL_Data&) const; + bool operator!=(const CRL_Data&) const; + bool operator<(const CRL_Data&) const; + }; + class BOTAN_DLL Cert_Info { public: diff --git a/src/checksum/adler32/adler32.h b/src/checksum/adler32/adler32.h index 79804a842..8cbd67f10 100644 --- a/src/checksum/adler32/adler32.h +++ b/src/checksum/adler32/adler32.h @@ -12,8 +12,8 @@ namespace Botan { -/* -* Adler32 +/** +* The Adler32 checksum, used in zlib */ class BOTAN_DLL Adler32 : public HashFunction { diff --git a/src/checksum/crc24/crc24.h b/src/checksum/crc24/crc24.h index f59ac4a45..2fc5af2ff 100644 --- a/src/checksum/crc24/crc24.h +++ b/src/checksum/crc24/crc24.h @@ -12,8 +12,8 @@ namespace Botan { -/* -* CRC24 +/** +* 24-bit cyclic redundancy check */ class BOTAN_DLL CRC24 : public HashFunction { diff --git a/src/checksum/crc32/crc32.h b/src/checksum/crc32/crc32.h index 998e8489e..9fd69670d 100644 --- a/src/checksum/crc32/crc32.h +++ b/src/checksum/crc32/crc32.h @@ -12,8 +12,8 @@ namespace Botan { -/* -* CRC32 +/** +* 32-bit cyclic redundancy check */ class BOTAN_DLL CRC32 : public HashFunction { diff --git a/src/cms/cms_dec.h b/src/cms/cms_dec.h index a00b44766..53d7114d6 100644 --- a/src/cms/cms_dec.h +++ b/src/cms/cms_dec.h @@ -16,7 +16,7 @@ namespace Botan { -/* +/** * CMS Decoding Operation */ class BOTAN_DLL CMS_Decoder diff --git a/src/cms/cms_enc.h b/src/cms/cms_enc.h index ec2fdf3b3..f8e9a5a8f 100644 --- a/src/cms/cms_enc.h +++ b/src/cms/cms_enc.h @@ -15,7 +15,7 @@ namespace Botan { -/* +/** * CMS Encoding Operation */ class BOTAN_DLL CMS_Encoder diff --git a/src/constructs/tss/tss.h b/src/constructs/tss/tss.h index c8b0242d8..440132eb9 100644 --- a/src/constructs/tss/tss.h +++ b/src/constructs/tss/tss.h @@ -15,6 +15,9 @@ namespace Botan { +/** +* A split secret, using the format from draft-mcgrew-tss-03 +*/ class BOTAN_DLL RTSS_Share { public: diff --git a/src/engine/aes_isa_eng/aes_isa_engine.h b/src/engine/aes_isa_eng/aes_isa_engine.h index 8a913551a..46b296bd5 100644 --- a/src/engine/aes_isa_eng/aes_isa_engine.h +++ b/src/engine/aes_isa_eng/aes_isa_engine.h @@ -12,6 +12,10 @@ namespace Botan { +/** +* Engine for implementations that hook into CPU-specific +* AES implementations (eg AES-NI, VIA C7, or AMD Geode) +*/ class AES_ISA_Engine : public Engine { public: diff --git a/src/engine/amd64_eng/amd64_engine.h b/src/engine/amd64_eng/amd64_engine.h index 358e31132..2b1038012 100644 --- a/src/engine/amd64_eng/amd64_engine.h +++ b/src/engine/amd64_eng/amd64_engine.h @@ -12,6 +12,9 @@ namespace Botan { +/** +* Engine for implementations that are x86-64 specific +*/ class AMD64_Assembler_Engine : public Engine { public: diff --git a/src/engine/def_engine/default_engine.h b/src/engine/def_engine/default_engine.h index 1e40cfe46..d07bf6598 100644 --- a/src/engine/def_engine/default_engine.h +++ b/src/engine/def_engine/default_engine.h @@ -12,7 +12,7 @@ namespace Botan { -/* +/** * Default Engine */ class Default_Engine : public Engine diff --git a/src/engine/engine.h b/src/engine/engine.h index 69592886c..9937d1dda 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -26,7 +26,7 @@ namespace Botan { class Algorithm_Factory; class Keyed_Filter; -/* +/** * Engine Base Class */ class BOTAN_DLL Engine diff --git a/src/engine/gnump/gmp_wrap.h b/src/engine/gnump/gmp_wrap.h index 82437ceba..52d130d6b 100644 --- a/src/engine/gnump/gmp_wrap.h +++ b/src/engine/gnump/gmp_wrap.h @@ -13,8 +13,8 @@ namespace Botan { -/* -* Lightweight GMP mpz_t Wrapper +/** +* Lightweight GMP mpz_t wrapper. For internal use only. */ class GMP_MPZ { diff --git a/src/engine/gnump/gnump_engine.h b/src/engine/gnump/gnump_engine.h index 1ca5a3548..fe154b914 100644 --- a/src/engine/gnump/gnump_engine.h +++ b/src/engine/gnump/gnump_engine.h @@ -12,8 +12,8 @@ namespace Botan { -/* -* GMP Engine +/** +* Engine using GNU MP */ class GMP_Engine : public Engine { diff --git a/src/engine/ia32_eng/ia32_engine.h b/src/engine/ia32_eng/ia32_engine.h index 77bdc5d74..6db5b55f6 100644 --- a/src/engine/ia32_eng/ia32_engine.h +++ b/src/engine/ia32_eng/ia32_engine.h @@ -12,6 +12,9 @@ namespace Botan { +/** +* Engine for x86-32 specific implementations +*/ class IA32_Assembler_Engine : public Engine { public: diff --git a/src/engine/openssl/bn_wrap.h b/src/engine/openssl/bn_wrap.h index 02a229fdd..372f5a329 100644 --- a/src/engine/openssl/bn_wrap.h +++ b/src/engine/openssl/bn_wrap.h @@ -13,8 +13,8 @@ namespace Botan { -/* -* Lightweight OpenSSL BN Wrapper +/** +* Lightweight OpenSSL BN wrapper. For internal use only. */ class OSSL_BN { @@ -36,8 +36,8 @@ class OSSL_BN ~OSSL_BN(); }; -/* -* Lightweight OpenSSL BN_CTX Wrapper +/** +* Lightweight OpenSSL BN_CTX wrapper. For internal use only. */ class OSSL_BN_CTX { diff --git a/src/engine/openssl/openssl_engine.h b/src/engine/openssl/openssl_engine.h index 1ee7e4c11..b6b027e6e 100644 --- a/src/engine/openssl/openssl_engine.h +++ b/src/engine/openssl/openssl_engine.h @@ -12,7 +12,7 @@ namespace Botan { -/* +/** * OpenSSL Engine */ class OpenSSL_Engine : public Engine diff --git a/src/engine/simd_engine/simd_engine.h b/src/engine/simd_engine/simd_engine.h index 9c117d45d..a2d51023d 100644 --- a/src/engine/simd_engine/simd_engine.h +++ b/src/engine/simd_engine/simd_engine.h @@ -12,6 +12,9 @@ namespace Botan { +/** +* Engine for implementations that use some kind of SIMD +*/ class SIMD_Engine : public Engine { public: diff --git a/src/entropy/dev_random/dev_random.h b/src/entropy/dev_random/dev_random.h index 3ffe536e3..e20e74300 100644 --- a/src/entropy/dev_random/dev_random.h +++ b/src/entropy/dev_random/dev_random.h @@ -14,6 +14,9 @@ namespace Botan { +/** +* Entropy source reading from kernel devices like /dev/random +*/ class Device_EntropySource : public EntropySource { public: diff --git a/src/entropy/entropy_src.h b/src/entropy/entropy_src.h index e5c22e2c3..63fd6a1f7 100644 --- a/src/entropy/entropy_src.h +++ b/src/entropy/entropy_src.h @@ -63,6 +63,9 @@ class BOTAN_DLL Entropy_Accumulator double collected_bits; }; +/** +* Entropy accumulator that puts the input into a BufferedComputation +*/ class BOTAN_DLL Entropy_Accumulator_BufferedComputation : public Entropy_Accumulator { public: diff --git a/src/entropy/hres_timer/hres_timer.h b/src/entropy/hres_timer/hres_timer.h index a602d5d7b..c693b8d4e 100644 --- a/src/entropy/hres_timer/hres_timer.h +++ b/src/entropy/hres_timer/hres_timer.h @@ -12,8 +12,8 @@ namespace Botan { -/* -* High Resolution Timestamp Source +/** +* Entropy source using high resolution timers */ class High_Resolution_Timestamp : public EntropySource { diff --git a/src/entropy/proc_walk/es_ftw.h b/src/entropy/proc_walk/es_ftw.h index d7a719818..337699564 100644 --- a/src/entropy/proc_walk/es_ftw.h +++ b/src/entropy/proc_walk/es_ftw.h @@ -25,6 +25,9 @@ class FTW_EntropySource : public EntropySource FTW_EntropySource(const std::string& root_dir); ~FTW_EntropySource(); + /** + * Returns file descriptors. Until it doesn't + */ class File_Descriptor_Source { public: @@ -32,7 +35,6 @@ class FTW_EntropySource : public EntropySource virtual ~File_Descriptor_Source() {} }; private: - std::string path; File_Descriptor_Source* dir; }; diff --git a/src/filters/buf_filt.h b/src/filters/buf_filt.h index 582f585b0..1ab402df7 100644 --- a/src/filters/buf_filt.h +++ b/src/filters/buf_filt.h @@ -12,6 +12,10 @@ namespace Botan { +/** +* Filter mixin that breaks input into blocks, useful for +* cipher modes +*/ class BOTAN_DLL Buffered_Filter { public: diff --git a/src/filters/bzip2/bzip2.cpp b/src/filters/bzip2/bzip2.cpp index 9dcee8fdf..b4b04a13e 100644 --- a/src/filters/bzip2/bzip2.cpp +++ b/src/filters/bzip2/bzip2.cpp @@ -54,8 +54,6 @@ void bzip_free(void* info_ptr, void* ptr) info->alloc->deallocate(ptr, i->second); } -} - /* * Wrapper Type for Bzip2 Stream */ @@ -79,6 +77,8 @@ class Bzip_Stream } }; +} + /* * Bzip_Compression Constructor */ diff --git a/src/filters/bzip2/bzip2.h b/src/filters/bzip2/bzip2.h index f42263537..3b40dbe40 100644 --- a/src/filters/bzip2/bzip2.h +++ b/src/filters/bzip2/bzip2.h @@ -13,7 +13,7 @@ namespace Botan { -/* +/** * Bzip Compression Filter */ class BOTAN_DLL Bzip_Compression : public Filter @@ -35,7 +35,7 @@ class BOTAN_DLL Bzip_Compression : public Filter class Bzip_Stream* bz; }; -/* +/** * Bzip Decompression Filter */ class BOTAN_DLL Bzip_Decompression : public Filter diff --git a/src/filters/filter.h b/src/filters/filter.h index 4773fe159..e401e063c 100644 --- a/src/filters/filter.h +++ b/src/filters/filter.h @@ -56,7 +56,7 @@ class BOTAN_DLL Filter /** * @param in some input for the filter */ - void send(byte in) { send(&input, 1); } + void send(byte in) { send(&in, 1); } /** * @param in some input for the filter diff --git a/src/filters/modes/cbc/cbc.h b/src/filters/modes/cbc/cbc.h index e51a94eac..3145f60ba 100644 --- a/src/filters/modes/cbc/cbc.h +++ b/src/filters/modes/cbc/cbc.h @@ -15,7 +15,7 @@ namespace Botan { -/* +/** * CBC Encryption */ class BOTAN_DLL CBC_Encryption : public Keyed_Filter, @@ -52,7 +52,7 @@ class BOTAN_DLL CBC_Encryption : public Keyed_Filter, SecureVector state; }; -/* +/** * CBC Decryption */ class BOTAN_DLL CBC_Decryption : public Keyed_Filter, diff --git a/src/filters/modes/cfb/cfb.h b/src/filters/modes/cfb/cfb.h index 249ae21db..758a47b33 100644 --- a/src/filters/modes/cfb/cfb.h +++ b/src/filters/modes/cfb/cfb.h @@ -13,7 +13,7 @@ namespace Botan { -/* +/** * CFB Encryption */ class BOTAN_DLL CFB_Encryption : public Keyed_Filter @@ -44,7 +44,7 @@ class BOTAN_DLL CFB_Encryption : public Keyed_Filter u32bit position, feedback; }; -/* +/** * CFB Decryption */ class BOTAN_DLL CFB_Decryption : public Keyed_Filter diff --git a/src/filters/modes/cts/cts.h b/src/filters/modes/cts/cts.h index c15fa9510..3f63060cf 100644 --- a/src/filters/modes/cts/cts.h +++ b/src/filters/modes/cts/cts.h @@ -13,8 +13,8 @@ namespace Botan { -/* -* CTS Encryption +/** +* CBC encryption with ciphertext stealing */ class BOTAN_DLL CTS_Encryption : public Keyed_Filter { @@ -45,8 +45,8 @@ class BOTAN_DLL CTS_Encryption : public Keyed_Filter u32bit position; }; -/* -* CTS Decryption +/** +* CBC decryption with ciphertext stealing */ class BOTAN_DLL CTS_Decryption : public Keyed_Filter { diff --git a/src/filters/modes/eax/eax.h b/src/filters/modes/eax/eax.h index e45e29ba8..750f77aa3 100644 --- a/src/filters/modes/eax/eax.h +++ b/src/filters/modes/eax/eax.h @@ -15,7 +15,7 @@ namespace Botan { -/* +/** * EAX Base Class */ class BOTAN_DLL EAX_Base : public Keyed_Filter @@ -43,7 +43,7 @@ class BOTAN_DLL EAX_Base : public Keyed_Filter SecureVector ctr_buf; }; -/* +/** * EAX Encryption */ class BOTAN_DLL EAX_Encryption : public EAX_Base @@ -64,7 +64,7 @@ class BOTAN_DLL EAX_Encryption : public EAX_Base void end_msg(); }; -/* +/** * EAX Decryption */ class BOTAN_DLL EAX_Decryption : public EAX_Base diff --git a/src/filters/modes/ecb/ecb.h b/src/filters/modes/ecb/ecb.h index 2b88191c7..eaf7fb143 100644 --- a/src/filters/modes/ecb/ecb.h +++ b/src/filters/modes/ecb/ecb.h @@ -15,7 +15,7 @@ namespace Botan { -/* +/** * ECB Encryption */ class BOTAN_DLL ECB_Encryption : public Keyed_Filter, @@ -49,7 +49,7 @@ class BOTAN_DLL ECB_Encryption : public Keyed_Filter, SecureVector temp; }; -/* +/** * ECB Decryption */ class BOTAN_DLL ECB_Decryption : public Keyed_Filter, diff --git a/src/filters/out_buf.h b/src/filters/out_buf.h index fecbf9191..120729de4 100644 --- a/src/filters/out_buf.h +++ b/src/filters/out_buf.h @@ -14,7 +14,7 @@ namespace Botan { -/* +/** * Container of output buffers for Pipe */ class Output_Buffers diff --git a/src/filters/pipe.h b/src/filters/pipe.h index 12d7716f1..3f3527177 100644 --- a/src/filters/pipe.h +++ b/src/filters/pipe.h @@ -22,12 +22,15 @@ namespace Botan { * collected for retrieval. If you're familiar with the Unix shell * environment, this design will sound quite familiar. */ - class BOTAN_DLL Pipe : public DataSource { public: typedef u32bit message_id; + /** + * Exception if you use an invalid message as an argument to + * read, remaining, etc + */ struct BOTAN_DLL Invalid_Message_Number : public Invalid_Argument { Invalid_Message_Number(const std::string& where, message_id msg) : diff --git a/src/filters/pk_filts/pk_filts.h b/src/filters/pk_filts/pk_filts.h index 8bf3fc238..81d6c9008 100644 --- a/src/filters/pk_filts/pk_filts.h +++ b/src/filters/pk_filts/pk_filts.h @@ -13,7 +13,7 @@ namespace Botan { -/* +/** * PK_Encryptor Filter */ class BOTAN_DLL PK_Encryptor_Filter : public Filter @@ -31,7 +31,7 @@ class BOTAN_DLL PK_Encryptor_Filter : public Filter SecureVector buffer; }; -/* +/** * PK_Decryptor Filter */ class BOTAN_DLL PK_Decryptor_Filter : public Filter @@ -46,7 +46,7 @@ class BOTAN_DLL PK_Decryptor_Filter : public Filter SecureVector buffer; }; -/* +/** * PK_Signer Filter */ class BOTAN_DLL PK_Signer_Filter : public Filter @@ -65,7 +65,7 @@ class BOTAN_DLL PK_Signer_Filter : public Filter RandomNumberGenerator& rng; }; -/* +/** * PK_Verifier Filter */ class BOTAN_DLL PK_Verifier_Filter : public Filter diff --git a/src/filters/secqueue.cpp b/src/filters/secqueue.cpp index c8d1c5fbf..26716a730 100644 --- a/src/filters/secqueue.cpp +++ b/src/filters/secqueue.cpp @@ -16,6 +16,9 @@ namespace Botan { class SecureQueueNode { public: + SecureQueueNode() { next = 0; start = end = 0; } + ~SecureQueueNode() { next = 0; start = end = 0; } + u32bit write(const byte input[], u32bit length) { u32bit copied = std::min(length, buffer.size() - end); @@ -23,6 +26,7 @@ class SecureQueueNode end += copied; return copied; } + u32bit read(byte output[], u32bit length) { u32bit copied = std::min(length, end - start); @@ -30,6 +34,7 @@ class SecureQueueNode start += copied; return copied; } + u32bit peek(byte output[], u32bit length, u32bit offset = 0) { const u32bit left = end - start; @@ -38,9 +43,8 @@ class SecureQueueNode copy_mem(output, buffer + start + offset, copied); return copied; } + u32bit size() const { return (end - start); } - SecureQueueNode() { next = 0; start = end = 0; } - ~SecureQueueNode() { next = 0; start = end = 0; } private: friend class SecureQueue; SecureQueueNode* next; diff --git a/src/filters/secqueue.h b/src/filters/secqueue.h index fc1fc213a..3cb486024 100644 --- a/src/filters/secqueue.h +++ b/src/filters/secqueue.h @@ -13,8 +13,8 @@ namespace Botan { -/* -* SecureQueue +/** +* A queue that knows how to zeroize itself */ class BOTAN_DLL SecureQueue : public Fanout_Filter, public DataSource { diff --git a/src/filters/zlib/zlib.cpp b/src/filters/zlib/zlib.cpp index 171caa73f..148ed3e6c 100644 --- a/src/filters/zlib/zlib.cpp +++ b/src/filters/zlib/zlib.cpp @@ -53,8 +53,6 @@ void zlib_free(void* info_ptr, void* ptr) info->alloc->deallocate(ptr, i->second); } -} - /* * Wrapper Type for Zlib z_stream */ @@ -78,6 +76,8 @@ class Zlib_Stream } }; +} + /* * Zlib_Compression Constructor */ diff --git a/src/filters/zlib/zlib.h b/src/filters/zlib/zlib.h index 4a7f3bc80..5f82880de 100644 --- a/src/filters/zlib/zlib.h +++ b/src/filters/zlib/zlib.h @@ -13,7 +13,7 @@ namespace Botan { -/* +/** * Zlib Compression Filter */ class BOTAN_DLL Zlib_Compression : public Filter @@ -34,7 +34,7 @@ class BOTAN_DLL Zlib_Compression : public Filter class Zlib_Stream* zlib; }; -/* +/** * Zlib Decompression Filter */ class BOTAN_DLL Zlib_Decompression : public Filter diff --git a/src/hash/bmw/bmw_512.h b/src/hash/bmw/bmw_512.h index c1c5238bd..d3c9c03c6 100644 --- a/src/hash/bmw/bmw_512.h +++ b/src/hash/bmw/bmw_512.h @@ -12,6 +12,9 @@ namespace Botan { +/** +* Blue Midnight Wish 512 (Round 2 tweaked version) +*/ class BOTAN_DLL BMW_512 : public MDx_HashFunction { public: diff --git a/src/hash/gost_3411/gost_3411.h b/src/hash/gost_3411/gost_3411.h index bedda3da7..04417d6fd 100644 --- a/src/hash/gost_3411/gost_3411.h +++ b/src/hash/gost_3411/gost_3411.h @@ -24,7 +24,7 @@ class BOTAN_DLL GOST_34_11 : public HashFunction HashFunction* clone() const { return new GOST_34_11; } GOST_34_11(); - protected: + private: void compress_n(const byte input[], u32bit blocks); void add_data(const byte[], u32bit); diff --git a/src/hash/md2/md2.h b/src/hash/md2/md2.h index df056dc12..9d39d8913 100644 --- a/src/hash/md2/md2.h +++ b/src/hash/md2/md2.h @@ -12,7 +12,7 @@ namespace Botan { -/* +/** * MD2 */ class BOTAN_DLL MD2 : public HashFunction diff --git a/src/hash/md4/md4.h b/src/hash/md4/md4.h index 843727f6d..98a05b2dd 100644 --- a/src/hash/md4/md4.h +++ b/src/hash/md4/md4.h @@ -12,7 +12,7 @@ namespace Botan { -/* +/** * MD4 */ class BOTAN_DLL MD4 : public MDx_HashFunction diff --git a/src/hash/md4_ia32/md4_ia32.h b/src/hash/md4_ia32/md4_ia32.h index f01d148f4..ef8060d3f 100644 --- a/src/hash/md4_ia32/md4_ia32.h +++ b/src/hash/md4_ia32/md4_ia32.h @@ -12,8 +12,8 @@ namespace Botan { -/* -* MD4 +/** +* MD4 using x86 assembly */ class BOTAN_DLL MD4_IA32 : public MD4 { diff --git a/src/hash/md5_ia32/md5_ia32.h b/src/hash/md5_ia32/md5_ia32.h index 723d724de..b65490760 100644 --- a/src/hash/md5_ia32/md5_ia32.h +++ b/src/hash/md5_ia32/md5_ia32.h @@ -12,8 +12,8 @@ namespace Botan { -/* -* MD5 +/** +* MD5 in x86 assembly */ class BOTAN_DLL MD5_IA32 : public MD5 { diff --git a/src/hash/mdx_hash/mdx_hash.h b/src/hash/mdx_hash/mdx_hash.h index 9fba0b799..aaf02449c 100644 --- a/src/hash/mdx_hash/mdx_hash.h +++ b/src/hash/mdx_hash/mdx_hash.h @@ -21,9 +21,15 @@ class BOTAN_DLL MDx_HashFunction : public HashFunction MDx_HashFunction(u32bit, u32bit, bool, bool, u32bit = 8); virtual ~MDx_HashFunction() {} protected: - void add_data(const byte[], u32bit); + void add_data(const byte input[], u32bit length); void final_result(byte output[]); - virtual void compress_n(const byte block[], u32bit block_n) = 0; + + /** + * Run the hash's compression function over a set of blocks + * @param blocks the input + * @param block_n the number of blocks + */ + virtual void compress_n(const byte blocks[], u32bit block_n) = 0; void clear(); virtual void copy_out(byte[]) = 0; diff --git a/src/hash/par_hash/par_hash.h b/src/hash/par_hash/par_hash.h index 874e491b1..34d69e39a 100644 --- a/src/hash/par_hash/par_hash.h +++ b/src/hash/par_hash/par_hash.h @@ -13,8 +13,8 @@ namespace Botan { -/* -* Parallel +/** +* Parallel Hashes */ class BOTAN_DLL Parallel : public HashFunction { diff --git a/src/hash/rmd128/rmd128.h b/src/hash/rmd128/rmd128.h index 9ae43483c..c7c7f4580 100644 --- a/src/hash/rmd128/rmd128.h +++ b/src/hash/rmd128/rmd128.h @@ -12,7 +12,7 @@ namespace Botan { -/* +/** * RIPEMD-128 */ class BOTAN_DLL RIPEMD_128 : public MDx_HashFunction @@ -22,7 +22,7 @@ class BOTAN_DLL RIPEMD_128 : public MDx_HashFunction std::string name() const { return "RIPEMD-128"; } HashFunction* clone() const { return new RIPEMD_128; } RIPEMD_128() : MDx_HashFunction(16, 64, false, true) { clear(); } - private: + private: void compress_n(const byte[], u32bit blocks); void copy_out(byte[]); diff --git a/src/hash/rmd160/rmd160.h b/src/hash/rmd160/rmd160.h index 399d5a7c3..0b6e847f0 100644 --- a/src/hash/rmd160/rmd160.h +++ b/src/hash/rmd160/rmd160.h @@ -12,7 +12,7 @@ namespace Botan { -/* +/** * RIPEMD-160 */ class BOTAN_DLL RIPEMD_160 : public MDx_HashFunction diff --git a/src/hash/sha1/sha160.h b/src/hash/sha1/sha160.h index cb7e63821..3d46e0c79 100644 --- a/src/hash/sha1/sha160.h +++ b/src/hash/sha1/sha160.h @@ -12,8 +12,8 @@ namespace Botan { -/* -* SHA-160 +/** +* NIST's SHA-160 */ class BOTAN_DLL SHA_160 : public MDx_HashFunction { diff --git a/src/hash/sha1_amd64/sha1_amd64.h b/src/hash/sha1_amd64/sha1_amd64.h index f182627a8..6cf3b0fb7 100644 --- a/src/hash/sha1_amd64/sha1_amd64.h +++ b/src/hash/sha1_amd64/sha1_amd64.h @@ -12,8 +12,8 @@ namespace Botan { -/* -* SHA-160 +/** +* SHA-160 in x86-64 assembly */ class BOTAN_DLL SHA_160_AMD64 : public SHA_160 { diff --git a/src/hash/sha1_ia32/sha1_ia32.h b/src/hash/sha1_ia32/sha1_ia32.h index fd34971cb..f579fbc90 100644 --- a/src/hash/sha1_ia32/sha1_ia32.h +++ b/src/hash/sha1_ia32/sha1_ia32.h @@ -12,8 +12,8 @@ namespace Botan { -/* -* SHA-160 +/** +* SHA-160 in x86 assembly */ class BOTAN_DLL SHA_160_IA32 : public SHA_160 { diff --git a/src/hash/sha1_sse2/sha1_sse2.h b/src/hash/sha1_sse2/sha1_sse2.h index 1c4b4cca7..90935c737 100644 --- a/src/hash/sha1_sse2/sha1_sse2.h +++ b/src/hash/sha1_sse2/sha1_sse2.h @@ -12,8 +12,8 @@ namespace Botan { -/* -* SHA-160 +/** +* SHA-160 using SSE2 for the message expansion */ class BOTAN_DLL SHA_160_SSE2 : public SHA_160 { diff --git a/src/hash/sha2/sha2_32.h b/src/hash/sha2/sha2_32.h index e157fd657..319432122 100644 --- a/src/hash/sha2/sha2_32.h +++ b/src/hash/sha2/sha2_32.h @@ -13,8 +13,8 @@ namespace Botan { -/* -* SHA-{224,256} Base +/** +* Base class for the 32-bit SHA-2 hashes (SHA-224 and SHA-256) */ class BOTAN_DLL SHA_224_256_BASE : public MDx_HashFunction { @@ -30,7 +30,7 @@ class BOTAN_DLL SHA_224_256_BASE : public MDx_HashFunction void copy_out(byte[]); }; -/* +/** * SHA-224 */ class BOTAN_DLL SHA_224 : public SHA_224_256_BASE @@ -42,7 +42,7 @@ class BOTAN_DLL SHA_224 : public SHA_224_256_BASE SHA_224() : SHA_224_256_BASE(28) { clear(); } }; -/* +/** * SHA-256 */ class BOTAN_DLL SHA_256 : public SHA_224_256_BASE diff --git a/src/hash/sha2/sha2_64.h b/src/hash/sha2/sha2_64.h index ed261b1c2..5094fc0d2 100644 --- a/src/hash/sha2/sha2_64.h +++ b/src/hash/sha2/sha2_64.h @@ -12,8 +12,8 @@ namespace Botan { -/* -* SHA-{384,512} Base +/** +* Base class for the 64-bit SHA-2 hashes (SHA-384 and SHA-512) */ class BOTAN_DLL SHA_384_512_BASE : public MDx_HashFunction { @@ -31,7 +31,7 @@ class BOTAN_DLL SHA_384_512_BASE : public MDx_HashFunction SecureVector W; }; -/* +/** * SHA-384 */ class BOTAN_DLL SHA_384 : public SHA_384_512_BASE @@ -43,7 +43,7 @@ class BOTAN_DLL SHA_384 : public SHA_384_512_BASE SHA_384() : SHA_384_512_BASE(48) { clear(); } }; -/* +/** * SHA-512 */ class BOTAN_DLL SHA_512 : public SHA_384_512_BASE diff --git a/src/hash/skein/skein_512.h b/src/hash/skein/skein_512.h index a633fabcb..b2ec57962 100644 --- a/src/hash/skein/skein_512.h +++ b/src/hash/skein/skein_512.h @@ -14,6 +14,9 @@ namespace Botan { +/** +* Skein-512, a SHA-3 candidate +*/ class BOTAN_DLL Skein_512 : public HashFunction { public: diff --git a/src/hash/tiger/tiger.h b/src/hash/tiger/tiger.h index 918e2de3c..c38df02e7 100644 --- a/src/hash/tiger/tiger.h +++ b/src/hash/tiger/tiger.h @@ -12,7 +12,7 @@ namespace Botan { -/* +/** * Tiger */ class BOTAN_DLL Tiger : public MDx_HashFunction diff --git a/src/hash/whirlpool/whrlpool.h b/src/hash/whirlpool/whrlpool.h index 4711fafa3..e28053d4f 100644 --- a/src/hash/whirlpool/whrlpool.h +++ b/src/hash/whirlpool/whrlpool.h @@ -12,7 +12,7 @@ namespace Botan { -/* +/** * Whirlpool */ class BOTAN_DLL Whirlpool : public MDx_HashFunction diff --git a/src/kdf/kdf.h b/src/kdf/kdf.h index 67078218f..614988f5a 100644 --- a/src/kdf/kdf.h +++ b/src/kdf/kdf.h @@ -13,7 +13,7 @@ namespace Botan { -/* +/** * Key Derivation Function */ class BOTAN_DLL KDF @@ -47,7 +47,7 @@ class BOTAN_DLL KDF const byte salt[], u32bit salt_len) const = 0; }; -/* +/** * Mask Generation Function */ class BOTAN_DLL MGF diff --git a/src/kdf/kdf1/kdf1.h b/src/kdf/kdf1/kdf1.h index d657cccc2..80ea470a9 100644 --- a/src/kdf/kdf1/kdf1.h +++ b/src/kdf/kdf1/kdf1.h @@ -13,8 +13,8 @@ namespace Botan { -/* -* KDF1 +/** +* KDF1, from IEEE 1363 */ class BOTAN_DLL KDF1 : public KDF { diff --git a/src/kdf/kdf2/kdf2.h b/src/kdf/kdf2/kdf2.h index f748bed0f..1f01008c0 100644 --- a/src/kdf/kdf2/kdf2.h +++ b/src/kdf/kdf2/kdf2.h @@ -13,8 +13,8 @@ namespace Botan { -/* -* KDF2 +/** +* KDF2, from IEEE 1363 */ class BOTAN_DLL KDF2 : public KDF { diff --git a/src/kdf/mgf1/mgf1.h b/src/kdf/mgf1/mgf1.h index 799ba7eed..2f7655fe2 100644 --- a/src/kdf/mgf1/mgf1.h +++ b/src/kdf/mgf1/mgf1.h @@ -13,8 +13,8 @@ namespace Botan { -/* -* MGF1 (Mask Generation Function) +/** +* MGF1 from PKCS #1 v2.0 */ class BOTAN_DLL MGF1 : public MGF { diff --git a/src/kdf/ssl_prf/prf_ssl3.h b/src/kdf/ssl_prf/prf_ssl3.h index 165fc7c3c..7d968eda1 100644 --- a/src/kdf/ssl_prf/prf_ssl3.h +++ b/src/kdf/ssl_prf/prf_ssl3.h @@ -12,8 +12,8 @@ namespace Botan { -/* -* SSL3 PRF +/** +* PRF used in SSLv3 */ class BOTAN_DLL SSL3_PRF : public KDF { diff --git a/src/kdf/tls_prf/prf_tls.h b/src/kdf/tls_prf/prf_tls.h index 6d1787609..c7ad81a97 100644 --- a/src/kdf/tls_prf/prf_tls.h +++ b/src/kdf/tls_prf/prf_tls.h @@ -14,8 +14,8 @@ namespace Botan { -/* -* TLS PRF +/** +* PRF used in TLS 1.0/1.1 */ class BOTAN_DLL TLS_PRF : public KDF { @@ -31,8 +31,8 @@ class BOTAN_DLL TLS_PRF : public KDF MessageAuthenticationCode* hmac_sha1; }; -/* -* TLS 1.2 PRF +/** +* PRF used in TLS 1.2 */ class BOTAN_DLL TLS_12_PRF : public KDF { diff --git a/src/kdf/x942_prf/prf_x942.h b/src/kdf/x942_prf/prf_x942.h index f957566b0..a5fe9f351 100644 --- a/src/kdf/x942_prf/prf_x942.h +++ b/src/kdf/x942_prf/prf_x942.h @@ -12,8 +12,8 @@ namespace Botan { -/* -* X9.42 PRF +/** +* PRF from ANSI X9.42 */ class BOTAN_DLL X942_PRF : public KDF { diff --git a/src/libstate/libstate.h b/src/libstate/libstate.h index 8f76ed8b2..058b70e74 100644 --- a/src/libstate/libstate.h +++ b/src/libstate/libstate.h @@ -20,8 +20,8 @@ namespace Botan { class Mutex; -/* -* Global State Container Base +/** +* Global state container aka the buritto at the center of it all */ class BOTAN_DLL Library_State { diff --git a/src/mac/cbc_mac/cbc_mac.h b/src/mac/cbc_mac/cbc_mac.h index 15026c0a9..3818cce84 100644 --- a/src/mac/cbc_mac/cbc_mac.h +++ b/src/mac/cbc_mac/cbc_mac.h @@ -13,7 +13,7 @@ namespace Botan { -/* +/** * CBC-MAC */ class BOTAN_DLL CBC_MAC : public MessageAuthenticationCode diff --git a/src/mac/cmac/cmac.h b/src/mac/cmac/cmac.h index 8297e5ea1..bf7ccdc91 100644 --- a/src/mac/cmac/cmac.h +++ b/src/mac/cmac/cmac.h @@ -13,8 +13,8 @@ namespace Botan { -/* -* CMAC +/** +* CMAC, also known as OMAC1 */ class BOTAN_DLL CMAC : public MessageAuthenticationCode { diff --git a/src/mac/ssl3mac/ssl3_mac.h b/src/mac/ssl3mac/ssl3_mac.h index 828b072ed..631b67c44 100644 --- a/src/mac/ssl3mac/ssl3_mac.h +++ b/src/mac/ssl3mac/ssl3_mac.h @@ -13,8 +13,8 @@ namespace Botan { -/* -* SSL3-MAC +/** +* A MAC only used in SSLv3. Do not use elsewhere! Use HMAC instead. */ class BOTAN_DLL SSL3_MAC : public MessageAuthenticationCode { diff --git a/src/math/numbertheory/def_powm.h b/src/math/numbertheory/def_powm.h index 5b8a5a591..ce128b965 100644 --- a/src/math/numbertheory/def_powm.h +++ b/src/math/numbertheory/def_powm.h @@ -14,7 +14,7 @@ namespace Botan { -/* +/** * Fixed Window Exponentiator */ class Fixed_Window_Exponentiator : public Modular_Exponentiator @@ -36,7 +36,7 @@ class Fixed_Window_Exponentiator : public Modular_Exponentiator Power_Mod::Usage_Hints hints; }; -/* +/** * Montgomery Exponentiator */ class Montgomery_Exponentiator : public Modular_Exponentiator diff --git a/src/math/numbertheory/point_gfp.h b/src/math/numbertheory/point_gfp.h index 0708493fe..5b3e32c7d 100644 --- a/src/math/numbertheory/point_gfp.h +++ b/src/math/numbertheory/point_gfp.h @@ -15,6 +15,10 @@ namespace Botan { +/** +* Exception thrown if you try to convert a zero point to an affine +* coordinate +*/ struct BOTAN_DLL Illegal_Transformation : public Exception { Illegal_Transformation(const std::string& err = @@ -22,6 +26,9 @@ struct BOTAN_DLL Illegal_Transformation : public Exception Exception(err) {} }; +/** +* Exception thrown if some form of illegal point is decoded +*/ struct BOTAN_DLL Illegal_Point : public Exception { Illegal_Point(const std::string& err = "Malformed ECP point detected") : diff --git a/src/math/numbertheory/pow_mod.h b/src/math/numbertheory/pow_mod.h index 7b92f0ec4..1a60ca05f 100644 --- a/src/math/numbertheory/pow_mod.h +++ b/src/math/numbertheory/pow_mod.h @@ -12,7 +12,7 @@ namespace Botan { -/* +/** * Modular Exponentiator Interface */ class BOTAN_DLL Modular_Exponentiator @@ -25,7 +25,7 @@ class BOTAN_DLL Modular_Exponentiator virtual ~Modular_Exponentiator() {} }; -/* +/** * Modular Exponentiator Proxy */ class BOTAN_DLL Power_Mod @@ -67,7 +67,7 @@ class BOTAN_DLL Power_Mod Usage_Hints hints; }; -/* +/** * Fixed Exponent Modular Exponentiator Proxy */ class BOTAN_DLL Fixed_Exponent_Power_Mod : public Power_Mod @@ -81,7 +81,7 @@ class BOTAN_DLL Fixed_Exponent_Power_Mod : public Power_Mod Usage_Hints = NO_HINTS); }; -/* +/** * Fixed Base Modular Exponentiator Proxy */ class BOTAN_DLL Fixed_Base_Power_Mod : public Power_Mod diff --git a/src/math/numbertheory/reducer.h b/src/math/numbertheory/reducer.h index c121f1499..861983ef0 100644 --- a/src/math/numbertheory/reducer.h +++ b/src/math/numbertheory/reducer.h @@ -12,7 +12,7 @@ namespace Botan { -/* +/** * Modular Reducer */ class BOTAN_DLL Modular_Reducer @@ -24,18 +24,25 @@ class BOTAN_DLL Modular_Reducer /** * Multiply mod p + * @param x + * @param y + * @return (x * y) % p */ BigInt multiply(const BigInt& x, const BigInt& y) const { return reduce(x * y); } /** * Square mod p + * @param x + * @return (x * x) % p */ BigInt square(const BigInt& x) const { return reduce(Botan::square(x)); } /** * Cube mod p + * @param x + * @return (x * x * x) % p */ BigInt cube(const BigInt& x) const { return multiply(x, this->square(x)); } diff --git a/src/mutex/mutex.h b/src/mutex/mutex.h index fcb0e9982..f209466d5 100644 --- a/src/mutex/mutex.h +++ b/src/mutex/mutex.h @@ -12,33 +12,48 @@ namespace Botan { -/* +/** * Mutex Base Class */ class Mutex { public: + /** + * Lock the mutex + */ virtual void lock() = 0; + + /** + * Unlock the mutex + */ virtual void unlock() = 0; virtual ~Mutex() {} }; -/* +/** * Mutex Factory */ class Mutex_Factory { public: + /** + * @return newly allocated mutex + */ virtual Mutex* make() = 0; + virtual ~Mutex_Factory() {} }; -/* -* Mutex Holding Class +/** +* Mutex Holding Class for RAII */ class Mutex_Holder { public: + /** + * Hold onto a mutex until we leave scope + * @param m the mutex to lock + */ Mutex_Holder(Mutex* m) : mux(m) { if(!mux) diff --git a/src/mutex/noop_mutex/mux_noop.h b/src/mutex/noop_mutex/mux_noop.h index a1bd57858..20989a635 100644 --- a/src/mutex/noop_mutex/mux_noop.h +++ b/src/mutex/noop_mutex/mux_noop.h @@ -12,7 +12,7 @@ namespace Botan { -/* +/** * No-Op Mutex Factory */ class Noop_Mutex_Factory : public Mutex_Factory diff --git a/src/mutex/pthreads/mux_pthr.h b/src/mutex/pthreads/mux_pthr.h index 27b854265..5cecd09ad 100644 --- a/src/mutex/pthreads/mux_pthr.h +++ b/src/mutex/pthreads/mux_pthr.h @@ -12,7 +12,7 @@ namespace Botan { -/* +/** * Pthread Mutex Factory */ class Pthread_Mutex_Factory : public Mutex_Factory diff --git a/src/mutex/qt_mutex/mux_qt.h b/src/mutex/qt_mutex/mux_qt.h index cb396b81d..3805acc3b 100644 --- a/src/mutex/qt_mutex/mux_qt.h +++ b/src/mutex/qt_mutex/mux_qt.h @@ -13,7 +13,7 @@ namespace Botan { -/* +/** * Qt Mutex */ class Qt_Mutex_Factory : public Mutex_Factory diff --git a/src/mutex/win32_crit_section/mux_win32.h b/src/mutex/win32_crit_section/mux_win32.h index 4bbf6a540..2aa51e18b 100644 --- a/src/mutex/win32_crit_section/mux_win32.h +++ b/src/mutex/win32_crit_section/mux_win32.h @@ -13,7 +13,7 @@ namespace Botan { -/* +/** * Win32 Mutex Factory */ class Win32_Mutex_Factory : public Mutex_Factory diff --git a/src/pbe/pbes1/pbes1.h b/src/pbe/pbes1/pbes1.h index 2e1855dc2..e0af8631b 100644 --- a/src/pbe/pbes1/pbes1.h +++ b/src/pbe/pbes1/pbes1.h @@ -15,8 +15,8 @@ namespace Botan { -/* -* PKCS#5 v1.5 PBE +/** +* PKCS #5 v1.5 PBE */ class BOTAN_DLL PBE_PKCS5v15 : public PBE { diff --git a/src/pbe/pbes2/pbes2.h b/src/pbe/pbes2/pbes2.h index fc460a228..e5182af78 100644 --- a/src/pbe/pbes2/pbes2.h +++ b/src/pbe/pbes2/pbes2.h @@ -15,8 +15,8 @@ namespace Botan { -/* -* PKCS#5 v2.0 PBE +/** +* PKCS #5 v2.0 PBE */ class BOTAN_DLL PBE_PKCS5v20 : public PBE { diff --git a/src/pk_pad/eme.h b/src/pk_pad/eme.h index 321c1d01e..02b8208ef 100644 --- a/src/pk_pad/eme.h +++ b/src/pk_pad/eme.h @@ -13,7 +13,7 @@ namespace Botan { -/* +/** * Encoding Method for Encryption */ class BOTAN_DLL EME diff --git a/src/pk_pad/eme1/eme1.h b/src/pk_pad/eme1/eme1.h index 4df5c5f1c..d00eeeeb9 100644 --- a/src/pk_pad/eme1/eme1.h +++ b/src/pk_pad/eme1/eme1.h @@ -14,8 +14,8 @@ namespace Botan { -/* -* EME1 +/** +* EME1, aka OAEP */ class BOTAN_DLL EME1 : public EME { diff --git a/src/pk_pad/eme_pkcs/eme_pkcs.h b/src/pk_pad/eme_pkcs/eme_pkcs.h index 1aeedf5d7..450d668d7 100644 --- a/src/pk_pad/eme_pkcs/eme_pkcs.h +++ b/src/pk_pad/eme_pkcs/eme_pkcs.h @@ -12,8 +12,8 @@ namespace Botan { -/* -* EME_PKCS1v15 +/** +* EME from PKCS #1 v1.5 */ class BOTAN_DLL EME_PKCS1v15 : public EME { diff --git a/src/pk_pad/emsa.h b/src/pk_pad/emsa.h index 8b19d3cb2..6d01beb7f 100644 --- a/src/pk_pad/emsa.h +++ b/src/pk_pad/emsa.h @@ -13,7 +13,7 @@ namespace Botan { -/* +/** * Encoding Method for Signatures, Appendix */ class BOTAN_DLL EMSA diff --git a/src/pk_pad/emsa1/emsa1.h b/src/pk_pad/emsa1/emsa1.h index d86020966..28d856525 100644 --- a/src/pk_pad/emsa1/emsa1.h +++ b/src/pk_pad/emsa1/emsa1.h @@ -13,8 +13,9 @@ namespace Botan { -/* -* EMSA1 +/** +* EMSA1 from IEEE 1363 +* Essentially, sign the hash directly */ class BOTAN_DLL EMSA1 : public EMSA { diff --git a/src/pk_pad/emsa2/emsa2.h b/src/pk_pad/emsa2/emsa2.h index 7efc80873..bda34fbd1 100644 --- a/src/pk_pad/emsa2/emsa2.h +++ b/src/pk_pad/emsa2/emsa2.h @@ -13,8 +13,9 @@ namespace Botan { -/* -* EMSA2 +/** +* EMSA2 from IEEE 1363 +* Useful for Rabin-Williams */ class BOTAN_DLL EMSA2 : public EMSA { diff --git a/src/pk_pad/emsa3/emsa3.h b/src/pk_pad/emsa3/emsa3.h index c4a3d658b..1e080aab6 100644 --- a/src/pk_pad/emsa3/emsa3.h +++ b/src/pk_pad/emsa3/emsa3.h @@ -14,7 +14,7 @@ namespace Botan { /** -* EMSA3 +* EMSA3 from IEEE 1363 * aka PKCS #1 v1.5 signature padding * aka PKCS #1 block type 1 */ diff --git a/src/pk_pad/emsa4/emsa4.h b/src/pk_pad/emsa4/emsa4.h index 9e37684f5..6315c424e 100644 --- a/src/pk_pad/emsa4/emsa4.h +++ b/src/pk_pad/emsa4/emsa4.h @@ -14,8 +14,8 @@ namespace Botan { -/* -* EMSA4 +/** +* EMSA4 aka PSS-R */ class BOTAN_DLL EMSA4 : public EMSA { diff --git a/src/pk_pad/emsa_raw/emsa_raw.h b/src/pk_pad/emsa_raw/emsa_raw.h index 5f2eaa2fe..ab27877a6 100644 --- a/src/pk_pad/emsa_raw/emsa_raw.h +++ b/src/pk_pad/emsa_raw/emsa_raw.h @@ -12,8 +12,9 @@ namespace Botan { -/* -* EMSA-Raw +/** +* EMSA-Raw - sign inputs directly +* Don't use this unless you know what you are doing. */ class BOTAN_DLL EMSA_Raw : public EMSA { diff --git a/src/pubkey/blinding.h b/src/pubkey/blinding.h index 03c9043dd..712030e4d 100644 --- a/src/pubkey/blinding.h +++ b/src/pubkey/blinding.h @@ -13,7 +13,7 @@ namespace Botan { -/* +/** * Blinding Function Object */ class BOTAN_DLL Blinder diff --git a/src/pubkey/dlies/dlies.h b/src/pubkey/dlies/dlies.h index fd2cefe4a..ad8f36b40 100644 --- a/src/pubkey/dlies/dlies.h +++ b/src/pubkey/dlies/dlies.h @@ -14,7 +14,7 @@ namespace Botan { -/* +/** * DLIES Encryption */ class BOTAN_DLL DLIES_Encryptor : public PK_Encryptor @@ -41,7 +41,7 @@ class BOTAN_DLL DLIES_Encryptor : public PK_Encryptor u32bit mac_keylen; }; -/* +/** * DLIES Decryption */ class BOTAN_DLL DLIES_Decryptor : public PK_Decryptor diff --git a/src/pubkey/dsa/dsa.h b/src/pubkey/dsa/dsa.h index 8121cfbbc..65b6edd98 100644 --- a/src/pubkey/dsa/dsa.h +++ b/src/pubkey/dsa/dsa.h @@ -15,7 +15,7 @@ namespace Botan { -/* +/** * DSA Public Key */ class BOTAN_DLL DSA_PublicKey : public virtual DL_Scheme_PublicKey @@ -39,7 +39,7 @@ class BOTAN_DLL DSA_PublicKey : public virtual DL_Scheme_PublicKey DSA_PublicKey() {} }; -/* +/** * DSA Private Key */ class BOTAN_DLL DSA_PrivateKey : public DSA_PublicKey, @@ -57,6 +57,9 @@ class BOTAN_DLL DSA_PrivateKey : public DSA_PublicKey, bool check_key(RandomNumberGenerator& rng, bool strong) const; }; +/** +* Object that can create a DSA signature +*/ class BOTAN_DLL DSA_Signature_Operation : public PK_Ops::Signature { public: @@ -75,6 +78,9 @@ class BOTAN_DLL DSA_Signature_Operation : public PK_Ops::Signature Modular_Reducer mod_q; }; +/** +* Object that can verify a DSA signature +*/ class BOTAN_DLL DSA_Verification_Operation : public PK_Ops::Verification { public: diff --git a/src/pubkey/ec_dompar/ec_dompar.h b/src/pubkey/ec_dompar/ec_dompar.h index 15143373a..546624bf6 100644 --- a/src/pubkey/ec_dompar/ec_dompar.h +++ b/src/pubkey/ec_dompar/ec_dompar.h @@ -25,6 +25,9 @@ enum EC_Domain_Params_Encoding { EC_DOMPAR_ENC_OID = 2 }; +/** +* Class representing an elliptic curve +*/ class BOTAN_DLL EC_Domain_Params { public: diff --git a/src/pubkey/ecdsa/ecdsa.h b/src/pubkey/ecdsa/ecdsa.h index 5e10c837d..7e7d85ab8 100644 --- a/src/pubkey/ecdsa/ecdsa.h +++ b/src/pubkey/ecdsa/ecdsa.h @@ -91,6 +91,9 @@ class BOTAN_DLL ECDSA_PrivateKey : public ECDSA_PublicKey, bool check_key(RandomNumberGenerator& rng, bool) const; }; +/** +* ECDSA signature operation +*/ class BOTAN_DLL ECDSA_Signature_Operation : public PK_Ops::Signature { public: @@ -110,6 +113,9 @@ class BOTAN_DLL ECDSA_Signature_Operation : public PK_Ops::Signature Modular_Reducer mod_order; }; +/** +* ECDSA verification operation +*/ class BOTAN_DLL ECDSA_Verification_Operation : public PK_Ops::Verification { public: diff --git a/src/pubkey/elgamal/elgamal.h b/src/pubkey/elgamal/elgamal.h index 143b417ec..f9b52c7b8 100644 --- a/src/pubkey/elgamal/elgamal.h +++ b/src/pubkey/elgamal/elgamal.h @@ -16,7 +16,7 @@ namespace Botan { -/* +/** * ElGamal Public Key */ class BOTAN_DLL ElGamal_PublicKey : public virtual DL_Scheme_PublicKey @@ -37,7 +37,7 @@ class BOTAN_DLL ElGamal_PublicKey : public virtual DL_Scheme_PublicKey ElGamal_PublicKey() {} }; -/* +/** * ElGamal Private Key */ class BOTAN_DLL ElGamal_PrivateKey : public ElGamal_PublicKey, @@ -55,6 +55,9 @@ class BOTAN_DLL ElGamal_PrivateKey : public ElGamal_PublicKey, const BigInt& priv_key = 0); }; +/** +* ElGamal encryption operation +*/ class BOTAN_DLL ElGamal_Encryption_Operation : public PK_Ops::Encryption { public: @@ -70,6 +73,9 @@ class BOTAN_DLL ElGamal_Encryption_Operation : public PK_Ops::Encryption Modular_Reducer mod_p; }; +/** +* ElGamal decryption operation +*/ class BOTAN_DLL ElGamal_Decryption_Operation : public PK_Ops::Decryption { public: diff --git a/src/pubkey/gost_3410/gost_3410.h b/src/pubkey/gost_3410/gost_3410.h index 5148b0204..9d6a15386 100644 --- a/src/pubkey/gost_3410/gost_3410.h +++ b/src/pubkey/gost_3410/gost_3410.h @@ -16,7 +16,7 @@ namespace Botan { /** -* This class represents GOST_3410 Public Keys. +* GOST-34.10 Public Key */ class BOTAN_DLL GOST_3410_PublicKey : public virtual EC_PublicKey { @@ -65,7 +65,7 @@ class BOTAN_DLL GOST_3410_PublicKey : public virtual EC_PublicKey }; /** -* This class represents GOST_3410 Private Keys +* GOST-34.10 Private Key */ class BOTAN_DLL GOST_3410_PrivateKey : public GOST_3410_PublicKey, public EC_PrivateKey @@ -97,6 +97,9 @@ class BOTAN_DLL GOST_3410_PrivateKey : public GOST_3410_PublicKey, { return EC_PublicKey::algorithm_identifier(); } }; +/** +* GOST-34.10 signature operation +*/ class BOTAN_DLL GOST_3410_Signature_Operation : public PK_Ops::Signature { public: @@ -115,6 +118,9 @@ class BOTAN_DLL GOST_3410_Signature_Operation : public PK_Ops::Signature const BigInt& x; }; +/** +* GOST-34.10 verification operation +*/ class BOTAN_DLL GOST_3410_Verification_Operation : public PK_Ops::Verification { public: diff --git a/src/pubkey/nr/nr.h b/src/pubkey/nr/nr.h index bd125ab92..cd12001ad 100644 --- a/src/pubkey/nr/nr.h +++ b/src/pubkey/nr/nr.h @@ -15,7 +15,7 @@ namespace Botan { -/* +/** * Nyberg-Rueppel Public Key */ class BOTAN_DLL NR_PublicKey : public virtual DL_Scheme_PublicKey @@ -37,7 +37,7 @@ class BOTAN_DLL NR_PublicKey : public virtual DL_Scheme_PublicKey NR_PublicKey() {} }; -/* +/** * Nyberg-Rueppel Private Key */ class BOTAN_DLL NR_PrivateKey : public NR_PublicKey, @@ -55,6 +55,9 @@ class BOTAN_DLL NR_PrivateKey : public NR_PublicKey, const BigInt& x = 0); }; +/** +* Nyberg-Rueppel signature operation +*/ class BOTAN_DLL NR_Signature_Operation : public PK_Ops::Signature { public: @@ -73,6 +76,9 @@ class BOTAN_DLL NR_Signature_Operation : public PK_Ops::Signature Modular_Reducer mod_q; }; +/** +* Nyberg-Rueppel verification operation +*/ class BOTAN_DLL NR_Verification_Operation : public PK_Ops::Verification { public: diff --git a/src/pubkey/pk_ops.h b/src/pubkey/pk_ops.h index 97ba372c2..7a5b1d94d 100644 --- a/src/pubkey/pk_ops.h +++ b/src/pubkey/pk_ops.h @@ -15,6 +15,9 @@ namespace Botan { namespace PK_Ops { +/** +* Public key encryption interface +*/ class BOTAN_DLL Encryption { public: @@ -26,6 +29,9 @@ class BOTAN_DLL Encryption virtual ~Encryption() {} }; +/** +* Public key decryption interface +*/ class BOTAN_DLL Decryption { public: @@ -37,6 +43,9 @@ class BOTAN_DLL Decryption virtual ~Decryption() {} }; +/** +* Public key signature creation interface +*/ class BOTAN_DLL Signature { public: @@ -70,6 +79,9 @@ class BOTAN_DLL Signature virtual ~Signature() {} }; +/** +* Public key signature verification interface +*/ class BOTAN_DLL Verification { public: @@ -127,8 +139,8 @@ class BOTAN_DLL Verification virtual ~Verification() {} }; -/* -* A generic Key Agreement Operation (eg DH or ECDH) +/** +* A generic key agreement Operation (eg DH or ECDH) */ class BOTAN_DLL Key_Agreement { diff --git a/src/pubkey/pubkey.h b/src/pubkey/pubkey.h index f6a120654..d034427e1 100644 --- a/src/pubkey/pubkey.h +++ b/src/pubkey/pubkey.h @@ -305,8 +305,8 @@ class BOTAN_DLL PK_Verifier Signature_Format sig_format; }; -/* -* Key Agreement +/** +* Key used for key agreement */ class BOTAN_DLL PK_Key_Agreement { diff --git a/src/pubkey/rsa/rsa.h b/src/pubkey/rsa/rsa.h index e2da173f9..f7700e08c 100644 --- a/src/pubkey/rsa/rsa.h +++ b/src/pubkey/rsa/rsa.h @@ -42,7 +42,7 @@ class BOTAN_DLL RSA_PublicKey : public virtual IF_Scheme_PublicKey }; /** -* RSA Private Key class. +* RSA Private Key */ class BOTAN_DLL RSA_PrivateKey : public RSA_PublicKey, public IF_Scheme_PrivateKey @@ -83,6 +83,9 @@ class BOTAN_DLL RSA_PrivateKey : public RSA_PublicKey, u32bit bits, u32bit exp = 65537); }; +/** +* RSA private (decrypt/sign) operation +*/ class BOTAN_DLL RSA_Private_Operation : public PK_Ops::Signature, public PK_Ops::Decryption { @@ -107,6 +110,9 @@ class BOTAN_DLL RSA_Private_Operation : public PK_Ops::Signature, Blinder blinder; }; +/** +* RSA public (encrypt/verify) operation +*/ class BOTAN_DLL RSA_Public_Operation : public PK_Ops::Verification, public PK_Ops::Encryption { diff --git a/src/pubkey/rw/rw.h b/src/pubkey/rw/rw.h index 831c7a960..24f4ffab6 100644 --- a/src/pubkey/rw/rw.h +++ b/src/pubkey/rw/rw.h @@ -15,7 +15,7 @@ namespace Botan { -/* +/** * Rabin-Williams Public Key */ class BOTAN_DLL RW_PublicKey : public virtual IF_Scheme_PublicKey @@ -36,7 +36,7 @@ class BOTAN_DLL RW_PublicKey : public virtual IF_Scheme_PublicKey RW_PublicKey() {} }; -/* +/** * Rabin-Williams Private Key */ class BOTAN_DLL RW_PrivateKey : public RW_PublicKey, @@ -59,6 +59,9 @@ class BOTAN_DLL RW_PrivateKey : public RW_PublicKey, bool check_key(RandomNumberGenerator& rng, bool) const; }; +/** +* Rabin-Williams Signature Operation +*/ class BOTAN_DLL RW_Signature_Operation : public PK_Ops::Signature { public: @@ -79,6 +82,9 @@ class BOTAN_DLL RW_Signature_Operation : public PK_Ops::Signature Blinder blinder; }; +/** +* Rabin-Williams Verification Operation +*/ class BOTAN_DLL RW_Verification_Operation : public PK_Ops::Verification { public: diff --git a/src/rng/auto_rng/auto_rng.h b/src/rng/auto_rng/auto_rng.h index 90f342a50..28a603feb 100644 --- a/src/rng/auto_rng/auto_rng.h +++ b/src/rng/auto_rng/auto_rng.h @@ -14,6 +14,9 @@ namespace Botan { +/** +* An automatically seeded PRNG +*/ class BOTAN_DLL AutoSeeded_RNG : public RandomNumberGenerator { public: diff --git a/src/rng/rng.h b/src/rng/rng.h index c53d8e22d..687f98d13 100644 --- a/src/rng/rng.h +++ b/src/rng/rng.h @@ -82,8 +82,8 @@ class BOTAN_DLL RandomNumberGenerator { return (*this); } }; -/* -* Null Random Number Generator +/** +* Null/stub RNG - fails if you try to use it for anything */ class BOTAN_DLL Null_RNG : public RandomNumberGenerator { diff --git a/src/s2k/pgps2k/pgp_s2k.h b/src/s2k/pgps2k/pgp_s2k.h index 7f25623f3..d4c6a02bb 100644 --- a/src/s2k/pgps2k/pgp_s2k.h +++ b/src/s2k/pgps2k/pgp_s2k.h @@ -13,8 +13,8 @@ namespace Botan { -/* -* OpenPGP S2K +/** +* OpenPGP's S2K */ class BOTAN_DLL OpenPGP_S2K : public S2K { diff --git a/src/s2k/s2k.h b/src/s2k/s2k.h index 055ef8911..5263dfd68 100644 --- a/src/s2k/s2k.h +++ b/src/s2k/s2k.h @@ -12,8 +12,9 @@ namespace Botan { -/* -* S2K Interface +/** +* Base class for S2K (string to key) operations, which convert a +* password/passphrase into a key */ class BOTAN_DLL S2K { diff --git a/src/ssl/tls_reader.h b/src/ssl/tls_reader.h index ff3e63ae8..641d1ecdb 100644 --- a/src/ssl/tls_reader.h +++ b/src/ssl/tls_reader.h @@ -13,6 +13,9 @@ namespace Botan { +/** +* Helper class for decoding TLS protocol messages +*/ class TLS_Data_Reader { public: diff --git a/src/stream/arc4/arc4.h b/src/stream/arc4/arc4.h index 07633f9ef..78c665985 100644 --- a/src/stream/arc4/arc4.h +++ b/src/stream/arc4/arc4.h @@ -13,8 +13,8 @@ namespace Botan { -/* -* ARC4 +/** +* Alleged RC4 */ class BOTAN_DLL ARC4 : public StreamCipher { diff --git a/src/stream/ctr/ctr.h b/src/stream/ctr/ctr.h index 5f94170cc..4e8d4de7f 100644 --- a/src/stream/ctr/ctr.h +++ b/src/stream/ctr/ctr.h @@ -13,8 +13,8 @@ namespace Botan { -/* -* CTR-BE (Counter, big-endian) +/** +* CTR-BE (Counter mode, big-endian) */ class BOTAN_DLL CTR_BE : public StreamCipher { diff --git a/src/stream/ofb/ofb.h b/src/stream/ofb/ofb.h index 1985ae5a9..de212ec2c 100644 --- a/src/stream/ofb/ofb.h +++ b/src/stream/ofb/ofb.h @@ -13,8 +13,8 @@ namespace Botan { -/* -* OFB Mode +/** +* Output Feedback Mode */ class BOTAN_DLL OFB : public StreamCipher { diff --git a/src/stream/salsa20/salsa20.h b/src/stream/salsa20/salsa20.h index 67fe54dda..4ba483082 100644 --- a/src/stream/salsa20/salsa20.h +++ b/src/stream/salsa20/salsa20.h @@ -12,8 +12,8 @@ namespace Botan { -/* -* Salsa20 (and XSalsa20) +/** +* DJB's Salsa20 (and XSalsa20) */ class BOTAN_DLL Salsa20 : public StreamCipher { diff --git a/src/stream/stream_cipher.h b/src/stream/stream_cipher.h index c5d115a5d..4ce5cb1a4 100644 --- a/src/stream/stream_cipher.h +++ b/src/stream/stream_cipher.h @@ -12,8 +12,8 @@ namespace Botan { -/* -* Stream Cipher +/** +* Base class for all stream ciphers */ class BOTAN_DLL StreamCipher : public SymmetricAlgorithm { diff --git a/src/stream/turing/turing.h b/src/stream/turing/turing.h index f9b4460ef..92c5083a4 100644 --- a/src/stream/turing/turing.h +++ b/src/stream/turing/turing.h @@ -12,7 +12,7 @@ namespace Botan { -/* +/** * Turing */ class BOTAN_DLL Turing : public StreamCipher diff --git a/src/stream/wid_wake/wid_wake.h b/src/stream/wid_wake/wid_wake.h index 1c52e8ba1..365a6d9ff 100644 --- a/src/stream/wid_wake/wid_wake.h +++ b/src/stream/wid_wake/wid_wake.h @@ -12,8 +12,11 @@ namespace Botan { -/* +/** * WiderWake4+1-BE +* +* Note: quite old and possibly not safe; use XSalsa20 or a block +* cipher in counter mode. */ class BOTAN_DLL WiderWake_41_BE : public StreamCipher { diff --git a/src/sym_algo/symkey.h b/src/sym_algo/symkey.h index 5504297a4..0d12377bd 100644 --- a/src/sym_algo/symkey.h +++ b/src/sym_algo/symkey.h @@ -13,7 +13,7 @@ namespace Botan { -/* +/** * Octet String */ class BOTAN_DLL OctetString diff --git a/src/utils/cpuid.h b/src/utils/cpuid.h index e7e15a887..a41e932fb 100644 --- a/src/utils/cpuid.h +++ b/src/utils/cpuid.h @@ -12,6 +12,9 @@ namespace Botan { +/** +* A class handling runtime CPU feature detection +*/ class BOTAN_DLL CPUID { public: diff --git a/src/utils/datastor/datastor.h b/src/utils/datastor/datastor.h index 7ee626fda..8d41b07a8 100644 --- a/src/utils/datastor/datastor.h +++ b/src/utils/datastor/datastor.h @@ -22,6 +22,9 @@ namespace Botan { class BOTAN_DLL Data_Store { public: + /** + * A search function + */ class BOTAN_DLL Matcher { public: diff --git a/src/utils/exceptn.h b/src/utils/exceptn.h index 5e264b916..ef7b451bf 100644 --- a/src/utils/exceptn.h +++ b/src/utils/exceptn.h @@ -19,7 +19,7 @@ namespace Botan { typedef std::runtime_error Exception; typedef std::invalid_argument Invalid_Argument; -/* +/** * Invalid_State Exception */ struct BOTAN_DLL Invalid_State : public Exception @@ -29,7 +29,7 @@ struct BOTAN_DLL Invalid_State : public Exception {} }; -/* +/** * Lookup_Error Exception */ struct BOTAN_DLL Lookup_Error : public Exception @@ -39,7 +39,7 @@ struct BOTAN_DLL Lookup_Error : public Exception {} }; -/* +/** * Internal_Error Exception */ struct BOTAN_DLL Internal_Error : public Exception @@ -49,7 +49,7 @@ struct BOTAN_DLL Internal_Error : public Exception {} }; -/* +/** * Invalid_Key_Length Exception */ struct BOTAN_DLL Invalid_Key_Length : public Invalid_Argument @@ -60,7 +60,7 @@ struct BOTAN_DLL Invalid_Key_Length : public Invalid_Argument {} }; -/* +/** * Invalid_Block_Size Exception */ struct BOTAN_DLL Invalid_Block_Size : public Invalid_Argument @@ -72,7 +72,7 @@ struct BOTAN_DLL Invalid_Block_Size : public Invalid_Argument {} }; -/* +/** * Invalid_IV_Length Exception */ struct BOTAN_DLL Invalid_IV_Length : public Invalid_Argument @@ -83,7 +83,7 @@ struct BOTAN_DLL Invalid_IV_Length : public Invalid_Argument {} }; -/* +/** * PRNG_Unseeded Exception */ struct BOTAN_DLL PRNG_Unseeded : public Invalid_State @@ -93,7 +93,7 @@ struct BOTAN_DLL PRNG_Unseeded : public Invalid_State {} }; -/* +/** * Policy_Violation Exception */ struct BOTAN_DLL Policy_Violation : public Invalid_State @@ -103,7 +103,7 @@ struct BOTAN_DLL Policy_Violation : public Invalid_State {} }; -/* +/** * Algorithm_Not_Found Exception */ struct BOTAN_DLL Algorithm_Not_Found : public Lookup_Error @@ -113,7 +113,7 @@ struct BOTAN_DLL Algorithm_Not_Found : public Lookup_Error {} }; -/* +/** * Invalid_Algorithm_Name Exception */ struct BOTAN_DLL Invalid_Algorithm_Name : public Invalid_Argument @@ -123,7 +123,7 @@ struct BOTAN_DLL Invalid_Algorithm_Name : public Invalid_Argument {} }; -/* +/** * Encoding_Error Exception */ struct BOTAN_DLL Encoding_Error : public Invalid_Argument @@ -132,7 +132,7 @@ struct BOTAN_DLL Encoding_Error : public Invalid_Argument Invalid_Argument("Encoding error: " + name) {} }; -/* +/** * Decoding_Error Exception */ struct BOTAN_DLL Decoding_Error : public Invalid_Argument @@ -141,7 +141,7 @@ struct BOTAN_DLL Decoding_Error : public Invalid_Argument Invalid_Argument("Decoding error: " + name) {} }; -/* +/** * Integrity_Failure Exception */ struct BOTAN_DLL Integrity_Failure : public Exception @@ -150,7 +150,7 @@ struct BOTAN_DLL Integrity_Failure : public Exception Exception("Integrity failure: " + what) {} }; -/* +/** * Invalid_OID Exception */ struct BOTAN_DLL Invalid_OID : public Decoding_Error @@ -159,7 +159,7 @@ struct BOTAN_DLL Invalid_OID : public Decoding_Error Decoding_Error("Invalid ASN.1 OID: " + oid) {} }; -/* +/** * Stream_IO_Error Exception */ struct BOTAN_DLL Stream_IO_Error : public Exception @@ -169,7 +169,7 @@ struct BOTAN_DLL Stream_IO_Error : public Exception {} }; -/* +/** * Self Test Failure Exception */ struct BOTAN_DLL Self_Test_Failure : public Internal_Error @@ -179,7 +179,7 @@ struct BOTAN_DLL Self_Test_Failure : public Internal_Error {} }; -/* +/** * Memory Allocation Exception */ struct BOTAN_DLL Memory_Exhaustion : public std::bad_alloc diff --git a/src/utils/simd_32/simd_scalar.h b/src/utils/simd_32/simd_scalar.h index d9766f252..56b529025 100644 --- a/src/utils/simd_32/simd_scalar.h +++ b/src/utils/simd_32/simd_scalar.h @@ -13,6 +13,10 @@ namespace Botan { +/** +* Fake SIMD, using plain scalar operations +* Often still faster than iterative on superscalar machines +*/ class SIMD_Scalar { public: diff --git a/src/utils/stl_util.h b/src/utils/stl_util.h index 18c8b149b..dddb48f12 100644 --- a/src/utils/stl_util.h +++ b/src/utils/stl_util.h @@ -52,7 +52,7 @@ inline R search_map(const std::map& mapping, const K& key, return found_result; } -/* +/** * Function adaptor for delete operation */ template @@ -62,7 +62,7 @@ class del_fun : public std::unary_function void operator()(T* ptr) { delete ptr; } }; -/* +/** * Delete the second half of a pair of objects */ template @@ -71,7 +71,7 @@ void delete2nd(Pair& pair) delete pair.second; } -/* +/** * Insert a key/value pair into a multimap */ template diff --git a/src/utils/ui.h b/src/utils/ui.h index fe62c60fc..f69bb2c6d 100644 --- a/src/utils/ui.h +++ b/src/utils/ui.h @@ -13,8 +13,9 @@ namespace Botan { -/* +/** * User Interface +* Only really used for callbacks for PKCS #8 decryption */ class BOTAN_DLL User_Interface { -- cgit v1.2.3 From ecb574d32f4382326e94ad19e9d5baecc84a3c29 Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 16 Jun 2010 00:52:24 +0000 Subject: More Doxygen comments --- src/algo_factory/algo_factory.h | 7 +++ src/constructs/tss/tss.h | 34 ++++++++++--- src/hash/comb4p/comb4p.h | 6 ++- src/hash/hash.h | 5 ++ src/hash/par_hash/par_hash.h | 5 +- src/hash/sha1/sha160.h | 6 +++ src/hash/sha2/sha2_32.h | 4 ++ src/hash/sha2/sha2_64.h | 3 ++ src/hash/skein/skein_512.h | 5 ++ src/libstate/init.h | 7 +++ src/libstate/libstate.h | 3 ++ src/mac/cbc_mac/cbc_mac.h | 5 +- src/mac/cmac/cmac.h | 10 +++- src/mac/mac.h | 6 +++ src/mac/ssl3mac/ssl3_mac.h | 5 +- src/mac/x919_mac/x919_mac.h | 5 +- src/pbe/pbes1/pbes1.h | 7 ++- src/s2k/pbkdf1/pbkdf1.h | 4 ++ src/s2k/pgps2k/pgp_s2k.h | 3 ++ src/ssl/tls_alerts.h | 8 +++ src/stream/arc4/arc4.h | 6 ++- src/stream/ctr/ctr.h | 5 +- src/stream/ofb/ofb.h | 5 +- src/sym_algo/symkey.h | 109 ++++++++++++++++++++++++++++++++++++---- 24 files changed, 235 insertions(+), 28 deletions(-) (limited to 'src/libstate/libstate.h') diff --git a/src/algo_factory/algo_factory.h b/src/algo_factory/algo_factory.h index 3284942ad..5e0e49f13 100644 --- a/src/algo_factory/algo_factory.h +++ b/src/algo_factory/algo_factory.h @@ -162,7 +162,14 @@ class BOTAN_DLL Algorithm_Factory class BOTAN_DLL Engine_Iterator { public: + /** + * @return next engine in the sequence + */ class Engine* next() { return af.get_engine_n(n++); } + + /** + * @param a an algorithm factory + */ Engine_Iterator(const Algorithm_Factory& a) : af(a) { n = 0; } private: const Algorithm_Factory& af; diff --git a/src/constructs/tss/tss.h b/src/constructs/tss/tss.h index 440132eb9..485e42c53 100644 --- a/src/constructs/tss/tss.h +++ b/src/constructs/tss/tss.h @@ -22,12 +22,12 @@ class BOTAN_DLL RTSS_Share { public: /** - * @arg M the number of shares needed to reconstruct - * @arg N the number of shares generated - * @arg secret the secret to split - * @arg secret_len the length of the secret - * @arg identifier the 16 byte share identifier - * @arg rng the random number generator to use + * @param M the number of shares needed to reconstruct + * @param N the number of shares generated + * @param secret the secret to split + * @param secret_len the length of the secret + * @param identifier the 16 byte share identifier + * @param rng the random number generator to use */ static std::vector split(byte M, byte N, @@ -36,18 +36,36 @@ class BOTAN_DLL RTSS_Share RandomNumberGenerator& rng); /** - * @arg shares the list of shares + * @param shares the list of shares */ static SecureVector reconstruct(const std::vector& shares); RTSS_Share() {} - RTSS_Share(const std::string&); + /** + * @param hex_input the share encoded in hexadecimal + */ + RTSS_Share(const std::string& hex_input); + + /** + * @return hex representation + */ std::string to_string() const; + + /** + * @return share identifier + */ byte share_id() const; + /** + * @return size of this share in bytes + */ u32bit size() const { return contents.size(); } + + /** + * @return if this TSS share was initialized or not + */ bool initialized() const { return (contents.size() > 0); } private: SecureVector contents; diff --git a/src/hash/comb4p/comb4p.h b/src/hash/comb4p/comb4p.h index 424512092..550b70b14 100644 --- a/src/hash/comb4p/comb4p.h +++ b/src/hash/comb4p/comb4p.h @@ -16,9 +16,13 @@ namespace Botan { * Combines two hash functions using a Feistel scheme. Described in * "On the Security of Hash Function Combiners", Anja Lehmann */ -class Comb4P : public HashFunction +class BOTAN_DLL Comb4P : public HashFunction { public: + /** + * @param h1 the first hash + * @param h2 the second hash + */ Comb4P(HashFunction* h1, HashFunction* h2); ~Comb4P() { delete hash1; delete hash2; } diff --git a/src/hash/hash.h b/src/hash/hash.h index 7cdfc6712..4f753f765 100644 --- a/src/hash/hash.h +++ b/src/hash/hash.h @@ -40,8 +40,13 @@ class BOTAN_DLL HashFunction : public BufferedComputation */ virtual void clear() = 0; + /** + * @param hash_len the output length + * @param block_len the internal block size (if applicable) + */ HashFunction(u32bit hash_len, u32bit block_len = 0) : BufferedComputation(hash_len), HASH_BLOCK_SIZE(block_len) {} + virtual ~HashFunction() {} private: HashFunction& operator=(const HashFunction&); diff --git a/src/hash/par_hash/par_hash.h b/src/hash/par_hash/par_hash.h index 34d69e39a..d82a74a19 100644 --- a/src/hash/par_hash/par_hash.h +++ b/src/hash/par_hash/par_hash.h @@ -23,7 +23,10 @@ class BOTAN_DLL Parallel : public HashFunction std::string name() const; HashFunction* clone() const; - Parallel(const std::vector&); + /** + * @param hashes a set of hashes to compute in parallel + */ + Parallel(const std::vector& hashes); ~Parallel(); private: void add_data(const byte[], u32bit); diff --git a/src/hash/sha1/sha160.h b/src/hash/sha1/sha160.h index 3d46e0c79..c66831a1e 100644 --- a/src/hash/sha1/sha160.h +++ b/src/hash/sha1/sha160.h @@ -24,6 +24,12 @@ class BOTAN_DLL SHA_160 : public MDx_HashFunction SHA_160(); protected: + /** + * Set a custom size for the W array. Normally 80, but some + * subclasses need slightly more for best performance/internal + * constraints + * @param W_size how big to make W + */ SHA_160(u32bit W_size); void compress_n(const byte[], u32bit blocks); diff --git a/src/hash/sha2/sha2_32.h b/src/hash/sha2/sha2_32.h index 319432122..e8e60d07c 100644 --- a/src/hash/sha2/sha2_32.h +++ b/src/hash/sha2/sha2_32.h @@ -20,6 +20,10 @@ class BOTAN_DLL SHA_224_256_BASE : public MDx_HashFunction { protected: void clear(); + + /** + * @param out output size in bytes + */ SHA_224_256_BASE(u32bit out) : MDx_HashFunction(out, 64, true, true) { clear(); } diff --git a/src/hash/sha2/sha2_64.h b/src/hash/sha2/sha2_64.h index 5094fc0d2..bf87eb62d 100644 --- a/src/hash/sha2/sha2_64.h +++ b/src/hash/sha2/sha2_64.h @@ -20,6 +20,9 @@ class BOTAN_DLL SHA_384_512_BASE : public MDx_HashFunction protected: void clear(); + /** + * @param out output size in bytes + */ SHA_384_512_BASE(u32bit out) : MDx_HashFunction(out, 128, true, true, 16) {} diff --git a/src/hash/skein/skein_512.h b/src/hash/skein/skein_512.h index b2ec57962..5d17fa564 100644 --- a/src/hash/skein/skein_512.h +++ b/src/hash/skein/skein_512.h @@ -20,6 +20,11 @@ namespace Botan { class BOTAN_DLL Skein_512 : public HashFunction { public: + /** + * @param output_bits the output size of Skein in bits + * @param personalization is a string that will paramaterize the + * hash output + */ Skein_512(u32bit output_bits = 512, const std::string& personalization = ""); diff --git a/src/libstate/init.h b/src/libstate/init.h index 4c4a09d1f..2d70e4370 100644 --- a/src/libstate/init.h +++ b/src/libstate/init.h @@ -22,8 +22,15 @@ namespace Botan { class BOTAN_DLL LibraryInitializer { public: + /** + * Initialize the library + * @param options a string listing initialization options + */ static void initialize(const std::string& options = ""); + /** + * Shutdown the library + */ static void deinitialize(); /** diff --git a/src/libstate/libstate.h b/src/libstate/libstate.h index 058b70e74..d7fb6e02c 100644 --- a/src/libstate/libstate.h +++ b/src/libstate/libstate.h @@ -29,6 +29,9 @@ class BOTAN_DLL Library_State Library_State(); ~Library_State(); + /** + * @param thread_safe should a mutex be used for serialization + */ void initialize(bool thread_safe); /** diff --git a/src/mac/cbc_mac/cbc_mac.h b/src/mac/cbc_mac/cbc_mac.h index 3818cce84..772abd38f 100644 --- a/src/mac/cbc_mac/cbc_mac.h +++ b/src/mac/cbc_mac/cbc_mac.h @@ -23,7 +23,10 @@ class BOTAN_DLL CBC_MAC : public MessageAuthenticationCode std::string name() const; MessageAuthenticationCode* clone() const; - CBC_MAC(BlockCipher* e); + /** + * @param cipher the underlying block cipher to use + */ + CBC_MAC(BlockCipher* cipher); ~CBC_MAC(); private: void add_data(const byte[], u32bit); diff --git a/src/mac/cmac/cmac.h b/src/mac/cmac/cmac.h index bf7ccdc91..b5f3eec1a 100644 --- a/src/mac/cmac/cmac.h +++ b/src/mac/cmac/cmac.h @@ -23,10 +23,18 @@ class BOTAN_DLL CMAC : public MessageAuthenticationCode std::string name() const; MessageAuthenticationCode* clone() const; + /** + * CMAC's polynomial doubling operation + * @param in the input + * @param polynomial the byte value of the polynomial + */ static SecureVector poly_double(const MemoryRegion& in, byte polynomial); - CMAC(BlockCipher* e); + /** + * @param cipher the underlying block cipher to use + */ + CMAC(BlockCipher* cipher); ~CMAC(); private: void add_data(const byte[], u32bit); diff --git a/src/mac/mac.h b/src/mac/mac.h index b93ae473d..52ff9c94c 100644 --- a/src/mac/mac.h +++ b/src/mac/mac.h @@ -45,6 +45,12 @@ class BOTAN_DLL MessageAuthenticationCode : public BufferedComputation, */ virtual void clear() = 0; + /** + * @param mac_len the output length of this MAC + * @param key_min the minimum key size + * @param key_max the maximum key size + * @param key_mod the modulo restriction on the key size + */ MessageAuthenticationCode(u32bit mac_len, u32bit key_min, u32bit key_max = 0, diff --git a/src/mac/ssl3mac/ssl3_mac.h b/src/mac/ssl3mac/ssl3_mac.h index 631b67c44..019163ec8 100644 --- a/src/mac/ssl3mac/ssl3_mac.h +++ b/src/mac/ssl3mac/ssl3_mac.h @@ -23,7 +23,10 @@ class BOTAN_DLL SSL3_MAC : public MessageAuthenticationCode std::string name() const; MessageAuthenticationCode* clone() const; - SSL3_MAC(HashFunction*); + /** + * @param hash the underlying hash to use + */ + SSL3_MAC(HashFunction* hash); ~SSL3_MAC() { delete hash; } private: void add_data(const byte[], u32bit); diff --git a/src/mac/x919_mac/x919_mac.h b/src/mac/x919_mac/x919_mac.h index abd149ecd..8432db7d1 100644 --- a/src/mac/x919_mac/x919_mac.h +++ b/src/mac/x919_mac/x919_mac.h @@ -23,7 +23,10 @@ class BOTAN_DLL ANSI_X919_MAC : public MessageAuthenticationCode std::string name() const; MessageAuthenticationCode* clone() const; - ANSI_X919_MAC(BlockCipher*); + /** + * @param cipher the underlying block cipher to use + */ + ANSI_X919_MAC(BlockCipher* cipher); ~ANSI_X919_MAC(); private: void add_data(const byte[], u32bit); diff --git a/src/pbe/pbes1/pbes1.h b/src/pbe/pbes1/pbes1.h index e0af8631b..d50c01f53 100644 --- a/src/pbe/pbes1/pbes1.h +++ b/src/pbe/pbes1/pbes1.h @@ -25,9 +25,14 @@ class BOTAN_DLL PBE_PKCS5v15 : public PBE void start_msg(); void end_msg(); + /** + * @param cipher the block cipher to use (DES or RC2) + * @param hash the hash function to use + * @param direction are we encrypting or decrypting + */ PBE_PKCS5v15(BlockCipher* cipher, HashFunction* hash, - Cipher_Dir); + Cipher_Dir direction); ~PBE_PKCS5v15(); private: diff --git a/src/s2k/pbkdf1/pbkdf1.h b/src/s2k/pbkdf1/pbkdf1.h index cf439efd8..c0508d127 100644 --- a/src/s2k/pbkdf1/pbkdf1.h +++ b/src/s2k/pbkdf1/pbkdf1.h @@ -33,6 +33,10 @@ class BOTAN_DLL PKCS5_PBKDF1 : public S2K */ PKCS5_PBKDF1(HashFunction* hash_in) : hash(hash_in) {} + /** + * Copy constructor + * @param other the object to copy + */ PKCS5_PBKDF1(const PKCS5_PBKDF1& other) : S2K(), hash(other.hash->clone()) {} diff --git a/src/s2k/pgps2k/pgp_s2k.h b/src/s2k/pgps2k/pgp_s2k.h index d4c6a02bb..cfe9bf5d5 100644 --- a/src/s2k/pgps2k/pgp_s2k.h +++ b/src/s2k/pgps2k/pgp_s2k.h @@ -27,6 +27,9 @@ class BOTAN_DLL OpenPGP_S2K : public S2K const byte salt[], u32bit salt_len, u32bit iterations) const; + /** + * @param hash_in the hash function to use + */ OpenPGP_S2K(HashFunction* hash_in) : hash(hash_in) {} ~OpenPGP_S2K() { delete hash; } private: diff --git a/src/ssl/tls_alerts.h b/src/ssl/tls_alerts.h index cb7529021..f189cf507 100644 --- a/src/ssl/tls_alerts.h +++ b/src/ssl/tls_alerts.h @@ -18,11 +18,19 @@ namespace Botan { class BOTAN_DLL Alert { public: + /** + * @return if this alert is a fatal one or not + */ bool is_fatal() const { return fatal; } + + /** + * @return type of alert + */ Alert_Type type() const { return type_code; } /** * Deserialize an Alert message + * @param buf the serialized alert */ Alert(const MemoryRegion& buf) { diff --git a/src/stream/arc4/arc4.h b/src/stream/arc4/arc4.h index 78c665985..0488783ef 100644 --- a/src/stream/arc4/arc4.h +++ b/src/stream/arc4/arc4.h @@ -26,7 +26,11 @@ class BOTAN_DLL ARC4 : public StreamCipher StreamCipher* clone() const { return new ARC4(SKIP); } - ARC4(u32bit = 0); + /** + * @param skip skip this many initial bytes in the keystream + */ + ARC4(u32bit skip = 0); + ~ARC4() { clear(); } private: void key_schedule(const byte[], u32bit); diff --git a/src/stream/ctr/ctr.h b/src/stream/ctr/ctr.h index 4e8d4de7f..fc7ba522f 100644 --- a/src/stream/ctr/ctr.h +++ b/src/stream/ctr/ctr.h @@ -33,7 +33,10 @@ class BOTAN_DLL CTR_BE : public StreamCipher void clear(); - CTR_BE(BlockCipher*); + /** + * @param cipher the underlying block cipher to use + */ + CTR_BE(BlockCipher* cipher); ~CTR_BE(); private: void key_schedule(const byte key[], u32bit key_len); diff --git a/src/stream/ofb/ofb.h b/src/stream/ofb/ofb.h index de212ec2c..2871dd8ee 100644 --- a/src/stream/ofb/ofb.h +++ b/src/stream/ofb/ofb.h @@ -33,7 +33,10 @@ class BOTAN_DLL OFB : public StreamCipher void clear(); - OFB(BlockCipher*); + /** + * @param cipher the underlying block cipher to use + */ + OFB(BlockCipher* cipher); ~OFB(); private: void key_schedule(const byte key[], u32bit key_len); diff --git a/src/sym_algo/symkey.h b/src/sym_algo/symkey.h index 0d12377bd..450dab306 100644 --- a/src/sym_algo/symkey.h +++ b/src/sym_algo/symkey.h @@ -19,37 +19,126 @@ namespace Botan { class BOTAN_DLL OctetString { public: + /** + * @return size of this octet string in bytes + */ u32bit length() const { return bits.size(); } + + /** + * @return this object as a SecureVector + */ SecureVector bits_of() const { return bits; } + /** + * @return start of this string + */ const byte* begin() const { return bits.begin(); } + + /** + * @return end of this string + */ const byte* end() const { return bits.end(); } + /** + * @return this encoded as hex + */ std::string as_string() const; - OctetString& operator^=(const OctetString&); + /** + * XOR the contents of another octet string into this one + * @param other octet string + * @return reference to this + */ + OctetString& operator^=(const OctetString& other); + /** + * Force to have odd parity + */ void set_odd_parity(); - void change(const std::string&); - void change(const byte[], u32bit); + /** + * Change the contents of this octet string + * @param hex_string a hex encoded bytestring + */ + void change(const std::string& hex_string); + + /** + * Change the contents of this octet string + * @param in the input + * @param length of in in bytes + */ + void change(const byte in[], u32bit length); + + /** + * Change the contents of this octet string + * @param in the input + */ void change(const MemoryRegion& in) { bits = in; } - OctetString(class RandomNumberGenerator&, u32bit len); + /** + * Create a new random OctetString + * @param rng is a random number generator + * @param len is the desired length in bytes + */ + OctetString(class RandomNumberGenerator& rng, u32bit len); + + /** + * Create a new OctetString + * @param str is a hex encoded string + */ OctetString(const std::string& str = "") { change(str); } + + /** + * Create a new OctetString + * @param in is an array + * @param len is the length of in in bytes + */ OctetString(const byte in[], u32bit len) { change(in, len); } + + /** + * Create a new OctetString + * @param in a bytestring + */ OctetString(const MemoryRegion& in) { change(in); } private: SecureVector bits; }; -/* -* Operations on Octet Strings +/** +* Compare two strings +* @param x an octet string +* @param y an octet string +* @return if x is equal to y +*/ +BOTAN_DLL bool operator==(const OctetString& x, + const OctetString& y); + +/** +* Compare two strings +* @param x an octet string +* @param y an octet string +* @return if x is not equal to y +*/ +BOTAN_DLL bool operator!=(const OctetString& x, + const OctetString& y); + +/** +* Concatenate two strings +* @param x an octet string +* @param y an octet string +* @return x concatenated with y +*/ +BOTAN_DLL OctetString operator+(const OctetString& x, + const OctetString& y); + +/** +* XOR two strings +* @param x an octet string +* @param y an octet string +* @return x XORed with y */ -BOTAN_DLL bool operator==(const OctetString&, const OctetString&); -BOTAN_DLL bool operator!=(const OctetString&, const OctetString&); -BOTAN_DLL OctetString operator+(const OctetString&, const OctetString&); -BOTAN_DLL OctetString operator^(const OctetString&, const OctetString&); +BOTAN_DLL OctetString operator^(const OctetString& x, + const OctetString& y); /* * Alternate Names -- cgit v1.2.3 From bfb119cc85776d38ee728d320605abcb3e52448e Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 16 Jun 2010 04:03:10 +0000 Subject: Replace "@return a blah" and "@return the blah" with just "@return blah" --- src/algo_factory/algo_cache.h | 2 +- src/alloc/secmem.h | 20 ++++++++++---------- src/asn1/asn1_oid.h | 6 +++--- src/block/block_cipher.h | 4 ++-- src/block/gost_28147/gost_28147.h | 2 +- src/cert/cvc/eac_asn_obj.h | 14 +++++++------- src/cert/cvc/signed_obj.h | 8 ++++---- src/cert/x509/crl_ent.h | 6 +++--- src/cert/x509/pkcs10.h | 16 ++++++++-------- src/cert/x509/x509_ca.h | 6 +++--- src/cert/x509/x509_crl.h | 10 +++++----- src/cert/x509/x509_obj.h | 2 +- src/cert/x509/x509cert.h | 30 +++++++++++++++--------------- src/cert/x509/x509self.h | 4 ++-- src/filters/data_src.h | 10 +++++----- src/filters/pipe.h | 20 ++++++++++---------- src/hash/hash.h | 2 +- src/libstate/libstate.h | 8 ++++---- src/libstate/look_pk.h | 10 +++++----- src/libstate/lookup.h | 22 +++++++++++----------- src/libstate/oid_lookup/oids.h | 4 ++-- src/libstate/scan_name.h | 18 +++++++++--------- src/mac/mac.h | 2 +- src/math/bigint/bigint.h | 4 ++-- src/pubkey/dl_algo/dl_algo.h | 12 ++++++------ src/pubkey/dl_group/dl_group.h | 10 +++++----- src/pubkey/ecdh/ecdh.h | 4 ++-- src/pubkey/if_algo/if_algo.h | 8 ++++---- src/pubkey/pk_keys.h | 10 +++++----- src/pubkey/pk_ops.h | 12 ++++++------ src/pubkey/pkcs8.h | 16 ++++++++-------- src/pubkey/pubkey.h | 16 ++++++++-------- src/s2k/s2k.h | 4 ++-- src/sym_algo/sym_algo.h | 2 +- src/utils/buf_comp/buf_comp.h | 2 +- src/utils/version.h | 10 +++++----- 36 files changed, 168 insertions(+), 168 deletions(-) (limited to 'src/libstate/libstate.h') diff --git a/src/algo_factory/algo_cache.h b/src/algo_factory/algo_cache.h index ad8d41383..376af130b 100644 --- a/src/algo_factory/algo_cache.h +++ b/src/algo_factory/algo_cache.h @@ -32,7 +32,7 @@ class Algorithm_Cache /** * @param algo_spec names the requested algorithm * @param pref_provider suggests a preferred provider - * @return a prototype object, or NULL + * @return prototype object, or NULL */ const T* get(const std::string& algo_spec, const std::string& pref_provider); diff --git a/src/alloc/secmem.h b/src/alloc/secmem.h index d1a3ba7bd..39b5549a9 100644 --- a/src/alloc/secmem.h +++ b/src/alloc/secmem.h @@ -24,7 +24,7 @@ class MemoryRegion /** * Find out the size of the buffer, i.e. how many objects of type T it * contains. - * @return the size of the buffer + * @return size of the buffer */ u32bit size() const { return used; } @@ -36,37 +36,37 @@ class MemoryRegion /** * Get a pointer to the first element in the buffer. - * @return a pointer to the first element in the buffer + * @return pointer to the first element in the buffer */ operator T* () { return buf; } /** * Get a constant pointer to the first element in the buffer. - * @return a constant pointer to the first element in the buffer + * @return constant pointer to the first element in the buffer */ operator const T* () const { return buf; } /** * Get a pointer to the first element in the buffer. - * @return a pointer to the first element in the buffer + * @return pointer to the first element in the buffer */ T* begin() { return buf; } /** * Get a constant pointer to the first element in the buffer. - * @return a constant pointer to the first element in the buffer + * @return constant pointer to the first element in the buffer */ const T* begin() const { return buf; } /** * Get a pointer to the last element in the buffer. - * @return a pointer to the last element in the buffer + * @return pointer to the last element in the buffer */ T* end() { return (buf + size()); } /** * Get a constant pointer to the last element in the buffer. - * @return a constant pointer to the last element in the buffer + * @return constant pointer to the last element in the buffer */ const T* end() const { return (buf + size()); } @@ -98,7 +98,7 @@ class MemoryRegion * Copy the contents of another buffer into this buffer. * The former contents of *this are discarded. * @param other the buffer to copy the contents from. - * @return a reference to *this + * @return reference to *this */ MemoryRegion& operator=(const MemoryRegion& other) { if(this != &other) set(other); return (*this); } @@ -299,7 +299,7 @@ class MemoryVector : public MemoryRegion /** * Copy the contents of another buffer into this buffer. * @param in the buffer to copy the contents from - * @return a reference to *this + * @return reference to *this */ MemoryVector& operator=(const MemoryRegion& in) { if(this != &in) set(in); return (*this); } @@ -352,7 +352,7 @@ class SecureVector : public MemoryRegion /** * Copy the contents of another buffer into this buffer. * @param in the buffer to copy the contents from - * @return a reference to *this + * @return reference to *this */ SecureVector& operator=(const MemoryRegion& in) { if(this != &in) set(in); return (*this); } diff --git a/src/asn1/asn1_oid.h b/src/asn1/asn1_oid.h index e6d077bee..b3db97744 100644 --- a/src/asn1/asn1_oid.h +++ b/src/asn1/asn1_oid.h @@ -31,13 +31,13 @@ class BOTAN_DLL OID : public ASN1_Object /** * Get this OID as list (vector) of its components. - * @return a vector representing this OID + * @return vector representing this OID */ std::vector get_id() const { return id; } /** * Get this OID as a string - * @return a string representing this OID + * @return string representing this OID */ std::string as_string() const; @@ -55,7 +55,7 @@ class BOTAN_DLL OID : public ASN1_Object /** * Add a component to this OID. * @param new_comp the new component to add to the end of this OID - * @return a reference to *this + * @return reference to *this */ OID& operator+=(u32bit new_comp); diff --git a/src/block/block_cipher.h b/src/block/block_cipher.h index 73c72a9e4..c1b58996e 100644 --- a/src/block/block_cipher.h +++ b/src/block/block_cipher.h @@ -40,12 +40,12 @@ class BOTAN_DLL BlockCipher : public SymmetricAlgorithm const u32bit BLOCK_SIZE; /** - * @return the native parallelism of this cipher in blocks + * @return native parallelism of this cipher in blocks */ virtual u32bit parallelism() const { return 1; } /** - * @return the prefererred parallelism of this cipher in bytes + * @return prefererred parallelism of this cipher in bytes */ u32bit parallel_bytes() const { diff --git a/src/block/gost_28147/gost_28147.h b/src/block/gost_28147/gost_28147.h index dbea932a0..ec23466f4 100644 --- a/src/block/gost_28147/gost_28147.h +++ b/src/block/gost_28147/gost_28147.h @@ -24,7 +24,7 @@ class BOTAN_DLL GOST_28147_89_Params /** * @param row the row * @param col the column - * @return the sbox entry at this row/column + * @return sbox entry at this row/column */ byte sbox_entry(u32bit row, u32bit col) const; diff --git a/src/cert/cvc/eac_asn_obj.h b/src/cert/cvc/eac_asn_obj.h index 9eaf02f63..d0bab6fdd 100644 --- a/src/cert/cvc/eac_asn_obj.h +++ b/src/cert/cvc/eac_asn_obj.h @@ -26,13 +26,13 @@ class BOTAN_DLL EAC_Time : public ASN1_Object /** * Get a this objects value as a string. - * @return the date string + * @return date string */ std::string as_string() const; /** * Get a this objects value as a readable formatted string. - * @return the date string + * @return date string */ std::string readable_string() const; @@ -72,19 +72,19 @@ class BOTAN_DLL EAC_Time : public ASN1_Object /** * Get the year value of this objects. - * @return the year value + * @return year value */ u32bit get_year() const; /** * Get the month value of this objects. - * @return the month value + * @return month value */ u32bit get_month() const; /** * Get the day value of this objects. - * @return the day value + * @return day value */ u32bit get_day() const; @@ -174,13 +174,13 @@ class BOTAN_DLL ASN1_EAC_String: public ASN1_Object /** * Get this objects string value. - * @return the string value + * @return string value */ std::string value() const; /** * Get this objects string value. - * @return the string value in iso8859 encoding + * @return string value in iso8859 encoding */ std::string iso_8859() const; diff --git a/src/cert/cvc/signed_obj.h b/src/cert/cvc/signed_obj.h index c0ae2cfc5..0c0fb30af 100644 --- a/src/cert/cvc/signed_obj.h +++ b/src/cert/cvc/signed_obj.h @@ -24,7 +24,7 @@ class BOTAN_DLL EAC_Signed_Object public: /** * Get the TBS (to-be-signed) data in this object. - * @return the DER encoded TBS data of this object + * @return DER encoded TBS data of this object */ virtual SecureVector tbs_data() const = 0; @@ -32,7 +32,7 @@ class BOTAN_DLL EAC_Signed_Object * Get the signature of this object as a concatenation, i.e. if the * signature consists of multiple parts (like in the case of ECDSA) * these will be concatenated. - * @return the signature as a concatenation of its parts + * @return signature as a concatenation of its parts */ /* @@ -67,13 +67,13 @@ class BOTAN_DLL EAC_Signed_Object /** * BER encode this object. - * @return the result containing the BER representation of this object. + * @return result containing the BER representation of this object. */ SecureVector BER_encode() const; /** * PEM encode this object. - * @return the result containing the PEM representation of this object. + * @return result containing the PEM representation of this object. */ std::string PEM_encode() const; diff --git a/src/cert/x509/crl_ent.h b/src/cert/x509/crl_ent.h index 2b06189e4..ec90750db 100644 --- a/src/cert/x509/crl_ent.h +++ b/src/cert/x509/crl_ent.h @@ -23,19 +23,19 @@ class BOTAN_DLL CRL_Entry : public ASN1_Object /** * Get the serial number of the certificate associated with this entry. - * @return the certificate's serial number + * @return certificate's serial number */ MemoryVector serial_number() const { return serial; } /** * Get the revocation date of the certificate associated with this entry - * @return the certificate's revocation date + * @return certificate's revocation date */ X509_Time expire_time() const { return time; } /** * Get the entries reason code - * @return the reason code + * @return reason code */ CRL_Code reason_code() const { return reason; } diff --git a/src/cert/x509/pkcs10.h b/src/cert/x509/pkcs10.h index 9b435de52..d1be9e0d3 100644 --- a/src/cert/x509/pkcs10.h +++ b/src/cert/x509/pkcs10.h @@ -23,38 +23,38 @@ class BOTAN_DLL PKCS10_Request : public X509_Object public: /** * Get the subject public key. - * @return the subject public key + * @return subject public key */ Public_Key* subject_public_key() const; /** * Get the raw DER encoded public key. - * @return the raw DER encoded public key + * @return raw DER encoded public key */ MemoryVector raw_public_key() const; /** * Get the subject DN. - * @return the subject DN + * @return subject DN */ X509_DN subject_dn() const; /** * Get the subject alternative name. - * @return the subject alternative name. + * @return subject alternative name. */ AlternativeName subject_alt_name() const; /** * Get the key constraints for the key associated with this * PKCS#10 object. - * @return the key constraints + * @return key constraints */ Key_Constraints constraints() const; /** * Get the extendend key constraints (if any). - * @return the extended key constraints + * @return extended key constraints */ std::vector ex_constraints() const; @@ -67,13 +67,13 @@ class BOTAN_DLL PKCS10_Request : public X509_Object /** * Return the constraint on the path length defined * in the BasicConstraints extension. - * @return the path limit + * @return path limit */ u32bit path_limit() const; /** * Get the challenge password for this request - * @return the challenge password for this request + * @return challenge password for this request */ std::string challenge_password() const; diff --git a/src/cert/x509/x509_ca.h b/src/cert/x509/x509_ca.h index 6f36444ee..97be6a415 100644 --- a/src/cert/x509/x509_ca.h +++ b/src/cert/x509/x509_ca.h @@ -30,7 +30,7 @@ class BOTAN_DLL X509_CA * @param rng the rng to use * @param not_before the starting time for the certificate * @param not_after the expiration time for the certificate - * @return the resulting certificate + * @return resulting certificate */ X509_Certificate sign_request(const PKCS10_Request& req, RandomNumberGenerator& rng, @@ -39,7 +39,7 @@ class BOTAN_DLL X509_CA /** * Get the certificate of this CA. - * @return the CA certificate + * @return CA certificate */ X509_Certificate ca_certificate() const; @@ -48,7 +48,7 @@ class BOTAN_DLL X509_CA * @param rng the random number generator to use * @param next_update the time to set in next update in seconds * as the offset from the current time - * @return the new CRL + * @return new CRL */ X509_CRL new_crl(RandomNumberGenerator& rng, u32bit next_update = 0) const; diff --git a/src/cert/x509/x509_crl.h b/src/cert/x509/x509_crl.h index 74427fbef..c2b3c4f5c 100644 --- a/src/cert/x509/x509_crl.h +++ b/src/cert/x509/x509_crl.h @@ -31,13 +31,13 @@ class BOTAN_DLL X509_CRL : public X509_Object /** * Get the entries of this CRL in the form of a vector. - * @return a vector containing the entries of this CRL. + * @return vector containing the entries of this CRL. */ std::vector get_revoked() const; /** * Get the issuer DN of this CRL. - * @return the CRLs issuer DN + * @return CRLs issuer DN */ X509_DN issuer_dn() const; @@ -49,19 +49,19 @@ class BOTAN_DLL X509_CRL : public X509_Object /** * Get the serial number of this CRL. - * @return the CRLs serial number + * @return CRLs serial number */ u32bit crl_number() const; /** * Get the CRL's thisUpdate value. - * @return the CRLs thisUpdate + * @return CRLs thisUpdate */ X509_Time this_update() const; /** * Get the CRL's nextUpdate value. - * @return the CRLs nextdUpdate + * @return CRLs nextdUpdate */ X509_Time next_update() const; diff --git a/src/cert/x509/x509_obj.h b/src/cert/x509/x509_obj.h index c7f92fa9d..52b76d218 100644 --- a/src/cert/x509/x509_obj.h +++ b/src/cert/x509/x509_obj.h @@ -33,7 +33,7 @@ class BOTAN_DLL X509_Object * @param rng the random number generator to use * @param alg_id the algorithm identifier of the signature scheme * @param tbs the tbs bits to be signed - * @return the signed X509 object + * @return signed X509 object */ static MemoryVector make_signed(class PK_Signer* signer, RandomNumberGenerator& rng, diff --git a/src/cert/x509/x509cert.h b/src/cert/x509/x509cert.h index 4a9d11f7f..dc7ef4dbb 100644 --- a/src/cert/x509/x509cert.h +++ b/src/cert/x509/x509cert.h @@ -24,19 +24,19 @@ class BOTAN_DLL X509_Certificate : public X509_Object public: /** * Get the public key associated with this certificate. - * @return the subject public key of this certificate + * @return subject public key of this certificate */ Public_Key* subject_public_key() const; /** * Get the issuer certificate DN. - * @return the issuer DN of this certificate + * @return issuer DN of this certificate */ X509_DN issuer_dn() const; /** * Get the subject certificate DN. - * @return the subject DN of this certificate + * @return subject DN of this certificate */ X509_DN subject_dn() const; @@ -50,7 +50,7 @@ class BOTAN_DLL X509_Certificate : public X509_Object * "X509v3.BasicConstraints.is_ca", "X509v3.ExtendedKeyUsage", * "X509v3.CertificatePolicies", "X509v3.SubjectKeyIdentifier" or * "X509.Certificate.serial". - * @return the value(s) of the specified parameter + * @return value(s) of the specified parameter */ std::vector subject_info(const std::string& name) const; @@ -58,43 +58,43 @@ class BOTAN_DLL X509_Certificate : public X509_Object * Get a value for a specific subject_info parameter name. * @param name the name of the paramter to look up. Possible names are * "X509.Certificate.v2.key_id" or "X509v3.AuthorityKeyIdentifier". - * @return the value(s) of the specified parameter + * @return value(s) of the specified parameter */ std::vector issuer_info(const std::string& name) const; /** * Get the notBefore of the certificate. - * @return the notBefore of the certificate + * @return notBefore of the certificate */ std::string start_time() const; /** * Get the notAfter of the certificate. - * @return the notAfter of the certificate + * @return notAfter of the certificate */ std::string end_time() const; /** * Get the X509 version of this certificate object. - * @return the X509 version + * @return X509 version */ u32bit x509_version() const; /** * Get the serial number of this certificate. - * @return the certificates serial number + * @return certificates serial number */ MemoryVector serial_number() const; /** * Get the DER encoded AuthorityKeyIdentifier of this certificate. - * @return the DER encoded AuthorityKeyIdentifier + * @return DER encoded AuthorityKeyIdentifier */ MemoryVector authority_key_id() const; /** * Get the DER encoded SubjectKeyIdentifier of this certificate. - * @return the DER encoded SubjectKeyIdentifier + * @return DER encoded SubjectKeyIdentifier */ MemoryVector subject_key_id() const; @@ -113,14 +113,14 @@ class BOTAN_DLL X509_Certificate : public X509_Object /** * Get the path limit as defined in the BasicConstraints extension of * this certificate. - * @return the path limit + * @return path limit */ u32bit path_limit() const; /** * Get the key constraints as defined in the KeyUsage extension of this * certificate. - * @return the key constraints + * @return key constraints */ Key_Constraints constraints() const; @@ -128,14 +128,14 @@ class BOTAN_DLL X509_Certificate : public X509_Object * Get the key constraints as defined in the ExtendedKeyUsage * extension of this * certificate. - * @return the key constraints + * @return key constraints */ std::vector ex_constraints() const; /** * Get the policies as defined in the CertificatePolicies extension * of this certificate. - * @return the certificate policies + * @return certificate policies */ std::vector policies() const; diff --git a/src/cert/x509/x509self.h b/src/cert/x509/x509self.h index 741350067..df5731050 100644 --- a/src/cert/x509/x509self.h +++ b/src/cert/x509/x509self.h @@ -174,7 +174,7 @@ namespace X509 { * associated with this self-signed certificate * @param hash_fn the hash function to use * @param rng the rng to use -* @return the newly created self-signed certificate +* @return newly created self-signed certificate */ BOTAN_DLL X509_Certificate create_self_signed_cert(const X509_Cert_Options& opts, @@ -188,7 +188,7 @@ create_self_signed_cert(const X509_Cert_Options& opts, * @param key the key used to sign this request * @param rng the rng to use * @param hash_fn the hash function to use -* @return the newly created PKCS#10 request +* @return newly created PKCS#10 request */ BOTAN_DLL PKCS10_Request create_cert_req(const X509_Cert_Options& opts, const Private_Key& key, diff --git a/src/filters/data_src.h b/src/filters/data_src.h index c69aa84b0..bf3bfa99b 100644 --- a/src/filters/data_src.h +++ b/src/filters/data_src.h @@ -26,7 +26,7 @@ class BOTAN_DLL DataSource * * @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 + * @return length in bytes that was actually read and put * into out */ virtual u32bit read(byte out[], u32bit length) = 0; @@ -39,7 +39,7 @@ class BOTAN_DLL DataSource * @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 + * @return length in bytes that was actually read and put * into out */ virtual u32bit peek(byte out[], u32bit length, @@ -59,7 +59,7 @@ class BOTAN_DLL DataSource /** * Read one byte. * @param out the byte to read to - * @return the length in bytes that was actually read and put + * @return length in bytes that was actually read and put * into out */ u32bit read_byte(byte& out); @@ -67,7 +67,7 @@ class BOTAN_DLL DataSource /** * Peek at one byte. * @param out an output byte - * @return the length in bytes that was actually read and put + * @return length in bytes that was actually read and put * into out */ u32bit peek_byte(byte& out) const; @@ -75,7 +75,7 @@ class BOTAN_DLL DataSource /** * Discard the next N bytes of the data * @param N the number of bytes to discard - * @return the number of bytes actually discarded + * @return number of bytes actually discarded */ u32bit discard_next(u32bit N); diff --git a/src/filters/pipe.h b/src/filters/pipe.h index 4f66b51d9..b7f09199b 100644 --- a/src/filters/pipe.h +++ b/src/filters/pipe.h @@ -116,7 +116,7 @@ class BOTAN_DLL Pipe : public DataSource * Find out how many bytes are ready to read. * @param msg the number identifying the message * for which the information is desired - * @return the number of bytes that can still be read + * @return number of bytes that can still be read */ u32bit remaining(message_id msg = DEFAULT_MESSAGE) const; @@ -127,7 +127,7 @@ class BOTAN_DLL Pipe : public DataSource * * @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 + * @return number of bytes actually read into output */ u32bit read(byte output[], u32bit length); @@ -138,7 +138,7 @@ class BOTAN_DLL Pipe : public DataSource * @param output the byte array to write the read bytes to * @param length the length of the byte array output * @param msg the number identifying the message to read from - * @return the number of bytes actually read into output + * @return number of bytes actually read into output */ u32bit read(byte output[], u32bit length, message_id msg); @@ -149,21 +149,21 @@ class BOTAN_DLL Pipe : public DataSource * * @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 + * @return number of bytes actually read into output */ u32bit read(byte& output, message_id msg = DEFAULT_MESSAGE); /** * Read the full contents of the pipe. * @param msg the number identifying the message to read from - * @return a SecureVector holding the contents of the pipe + * @return SecureVector holding the contents of the pipe */ SecureVector read_all(message_id msg = DEFAULT_MESSAGE); /** * Read the full contents of the pipe. * @param msg the number identifying the message to read from - * @return a string holding the contents of the pipe + * @return string holding the contents of the pipe */ std::string read_all_as_string(message_id = DEFAULT_MESSAGE); @@ -173,7 +173,7 @@ class BOTAN_DLL Pipe : public DataSource * @param output the byte array to write the peeked message part to * @param length the length of the byte array output * @param offset the offset from the current position in message - * @return the number of bytes actually peeked and written into output + * @return number of bytes actually peeked and written into output */ u32bit peek(byte output[], u32bit length, u32bit offset) const; @@ -184,7 +184,7 @@ class BOTAN_DLL Pipe : public DataSource * @param length the length of the byte array output * @param offset the offset from the current position in message * @param msg the number identifying the message to peek from - * @return the number of bytes actually peeked and written into output + * @return number of bytes actually peeked and written into output */ u32bit peek(byte output[], u32bit length, u32bit offset, message_id msg) const; @@ -195,7 +195,7 @@ class BOTAN_DLL Pipe : public DataSource * @param output the byte to write the peeked message byte to * @param offset the offset from the current position in message * @param msg the number identifying the message to peek from - * @return the number of bytes actually peeked and written into output + * @return number of bytes actually peeked and written into output */ u32bit peek(byte& output, u32bit offset, message_id msg = DEFAULT_MESSAGE) const; @@ -214,7 +214,7 @@ class BOTAN_DLL Pipe : public DataSource /** * Get the number of messages the are in this pipe. - * @return the number of messages the are in this pipe + * @return number of messages the are in this pipe */ message_id message_count() const; diff --git a/src/hash/hash.h b/src/hash/hash.h index 4f753f765..cdf90f184 100644 --- a/src/hash/hash.h +++ b/src/hash/hash.h @@ -31,7 +31,7 @@ class BOTAN_DLL HashFunction : public BufferedComputation /** * Get the name of this algorithm. - * @return the name of this algorithm + * @return name of this algorithm */ virtual std::string name() const = 0; diff --git a/src/libstate/libstate.h b/src/libstate/libstate.h index d7fb6e02c..eeb38287a 100644 --- a/src/libstate/libstate.h +++ b/src/libstate/libstate.h @@ -35,12 +35,12 @@ class BOTAN_DLL Library_State void initialize(bool thread_safe); /** - * @return the global Algorithm_Factory + * @return global Algorithm_Factory */ Algorithm_Factory& algorithm_factory() const; /** - * @return the global RandomNumberGenerator + * @return global RandomNumberGenerator */ RandomNumberGenerator& global_rng(); @@ -111,7 +111,7 @@ class BOTAN_DLL Library_State std::string deref_alias(const std::string& alias) const; /** - * @return a newly created Mutex (free with delete) + * @return newly created Mutex (free with delete) */ Mutex* get_mutex() const; private: @@ -155,7 +155,7 @@ BOTAN_DLL void set_global_state(Library_State* state); /** * Swap the current state for another * @param new_state the new state object to use -* @return the previous state (or NULL if none) +* @return previous state (or NULL if none) */ BOTAN_DLL Library_State* swap_global_state(Library_State* new_state); diff --git a/src/libstate/look_pk.h b/src/libstate/look_pk.h index e1dc1d95c..c980e5f8d 100644 --- a/src/libstate/look_pk.h +++ b/src/libstate/look_pk.h @@ -19,7 +19,7 @@ namespace Botan { * * @param key the key that will work inside the encryptor * @param eme determines the algorithm and encoding -* @return the public key encryptor object +* @return public key encryptor object */ inline PK_Encryptor* get_pk_encryptor(const Public_Key& key, const std::string& eme) @@ -33,7 +33,7 @@ inline PK_Encryptor* get_pk_encryptor(const Public_Key& key, * * @param key the key that will work inside the decryptor * @param eme determines the algorithm and encoding -* @return the public key decryptor object +* @return public key decryptor object */ inline PK_Decryptor* get_pk_decryptor(const Private_Key& key, const std::string& eme) @@ -48,7 +48,7 @@ inline PK_Decryptor* get_pk_decryptor(const Private_Key& key, * @param key the key that will work inside the signer * @param emsa determines the algorithm, encoding and hash algorithm * @param sig_format the signature format to be used -* @return the public key signer object +* @return public key signer object */ inline PK_Signer* get_pk_signer(const Private_Key& key, const std::string& emsa, @@ -64,7 +64,7 @@ inline PK_Signer* get_pk_signer(const Private_Key& key, * @param key the key that will work inside the verifier * @param emsa determines the algorithm, encoding and hash algorithm * @param sig_format the signature format to be used -* @return the public key verifier object +* @return public key verifier object */ inline PK_Verifier* get_pk_verifier(const Public_Key& key, const std::string& emsa, @@ -79,7 +79,7 @@ inline PK_Verifier* get_pk_verifier(const Public_Key& key, * * @param key the key that will work inside the key agreement * @param kdf the kdf algorithm to use -* @return the key agreement algorithm +* @return key agreement algorithm */ inline PK_Key_Agreement* get_pk_kas(const PK_Key_Agreement_Key& key, const std::string& kdf) diff --git a/src/libstate/lookup.h b/src/libstate/lookup.h index aa3a65f96..76e06b2de 100644 --- a/src/libstate/lookup.h +++ b/src/libstate/lookup.h @@ -64,7 +64,7 @@ retrieve_mac(const std::string& algo_spec) * @deprecated Call algorithm_factory() directly * * @param algo_spec the name of the desired block cipher -* @return a pointer to the block cipher object +* @return pointer to the block cipher object */ inline BlockCipher* get_block_cipher(const std::string& algo_spec) { @@ -77,7 +77,7 @@ inline BlockCipher* get_block_cipher(const std::string& algo_spec) * @deprecated Call algorithm_factory() directly * * @param algo_spec the name of the desired stream cipher -* @return a pointer to the stream cipher object +* @return pointer to the stream cipher object */ inline StreamCipher* get_stream_cipher(const std::string& algo_spec) { @@ -90,7 +90,7 @@ inline StreamCipher* get_stream_cipher(const std::string& algo_spec) * @deprecated Call algorithm_factory() directly * * @param algo_spec the name of the desired hash function -* @return a pointer to the hash function object +* @return pointer to the hash function object */ inline HashFunction* get_hash(const std::string& algo_spec) { @@ -103,7 +103,7 @@ inline HashFunction* get_hash(const std::string& algo_spec) * @deprecated Call algorithm_factory() directly * * @param algo_spec the name of the desired MAC -* @return a pointer to the MAC object +* @return pointer to the MAC object */ inline MessageAuthenticationCode* get_mac(const std::string& algo_spec) { @@ -114,7 +114,7 @@ inline MessageAuthenticationCode* get_mac(const std::string& algo_spec) /** * String to key algorithm factory method. * @param algo_spec the name of the desired string to key (S2K) algorithm -* @return a pointer to the string to key algorithm object +* @return pointer to the string to key algorithm object */ BOTAN_DLL S2K* get_s2k(const std::string& algo_spec); @@ -127,7 +127,7 @@ BOTAN_DLL S2K* get_s2k(const std::string& algo_spec); /** * Factory method for EME (message-encoding methods for encryption) objects * @param algo_spec the name of the EME to create -* @return a pointer to the desired EME object +* @return pointer to the desired EME object */ BOTAN_DLL EME* get_eme(const std::string& algo_spec); @@ -135,14 +135,14 @@ BOTAN_DLL EME* get_eme(const std::string& algo_spec); * Factory method for EMSA (message-encoding methods for signatures * with appendix) objects * @param algo_spec the name of the EME to create -* @return a pointer to the desired EME object +* @return pointer to the desired EME object */ BOTAN_DLL EMSA* get_emsa(const std::string& algo_spec); /** * Factory method for KDF (key derivation function) * @param algo_spec the name of the KDF to create -* @return a pointer to the desired KDF object +* @return pointer to the desired KDF object */ BOTAN_DLL KDF* get_kdf(const std::string& algo_spec); @@ -158,7 +158,7 @@ BOTAN_DLL KDF* get_kdf(const std::string& algo_spec); * @param iv the initialization vector to be used * @param direction determines whether the filter will be an encrypting * or decrypting filter -* @return a pointer to the encryption or decryption filter +* @return pointer to the encryption or decryption filter */ BOTAN_DLL Keyed_Filter* get_cipher(const std::string& algo_spec, const SymmetricKey& key, @@ -172,7 +172,7 @@ BOTAN_DLL Keyed_Filter* get_cipher(const std::string& algo_spec, * the filter * @param direction determines whether the filter will be an encrypting * or decrypting filter -* @return a pointer to the encryption or decryption filter +* @return pointer to the encryption or decryption filter */ BOTAN_DLL Keyed_Filter* get_cipher(const std::string& algo_spec, const SymmetricKey& key, @@ -185,7 +185,7 @@ BOTAN_DLL Keyed_Filter* get_cipher(const std::string& algo_spec, * @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 +* @return pointer to the encryption or decryption filter */ BOTAN_DLL Keyed_Filter* get_cipher(const std::string& algo_spec, Cipher_Dir direction); diff --git a/src/libstate/oid_lookup/oids.h b/src/libstate/oid_lookup/oids.h index fdfe61f7c..70b7dee81 100644 --- a/src/libstate/oid_lookup/oids.h +++ b/src/libstate/oid_lookup/oids.h @@ -31,7 +31,7 @@ BOTAN_DLL bool have_oid(const std::string& oid); /** * Resolve an OID * @param oid the OID to look up -* @return the name associated with this OID +* @return name associated with this OID */ BOTAN_DLL std::string lookup(const OID& oid); @@ -39,7 +39,7 @@ BOTAN_DLL std::string lookup(const OID& oid); * Find the OID to a name. The lookup will be performed in the * general OID section of the configuration. * @param name the name to resolve -* @return the OID associated with the specified name +* @return OID associated with the specified name */ BOTAN_DLL OID lookup(const std::string& name); diff --git a/src/libstate/scan_name.h b/src/libstate/scan_name.h index 49c3d3765..3d11d54f6 100644 --- a/src/libstate/scan_name.h +++ b/src/libstate/scan_name.h @@ -28,22 +28,22 @@ class BOTAN_DLL SCAN_Name SCAN_Name(std::string algo_spec); /** - * @return the original input string + * @return original input string */ std::string as_string() const { return orig_algo_spec; } /** - * @return the algorithm name + * @return algorithm name */ std::string algo_name() const { return alg_name; } /** - * @return the algorithm name plus any arguments + * @return algorithm name plus any arguments */ std::string algo_name_and_args() const; /** - * @return the number of arguments + * @return number of arguments */ u32bit arg_count() const { return args.size(); } @@ -57,32 +57,32 @@ class BOTAN_DLL SCAN_Name /** * @param i which argument - * @return the ith argument + * @return ith argument */ std::string arg(u32bit i) const; /** * @param i which argument * @param def_value the default value - * @return the ith argument or the default value + * @return ith argument or the default value */ std::string arg(u32bit i, const std::string& def_value) const; /** * @param i which argument * @param def_value the default value - * @return the ith argument as a u32bit, or the default value + * @return ith argument as a u32bit, or the default value */ u32bit arg_as_u32bit(u32bit i, u32bit def_value) const; /** - * @return the cipher mode (if any) + * @return cipher mode (if any) */ std::string cipher_mode() const { return (mode_info.size() >= 1) ? mode_info[0] : ""; } /** - * @return the cipher mode padding (if any) + * @return cipher mode padding (if any) */ std::string cipher_mode_pad() const { return (mode_info.size() >= 2) ? mode_info[1] : ""; } diff --git a/src/mac/mac.h b/src/mac/mac.h index 52ff9c94c..4518d91ad 100644 --- a/src/mac/mac.h +++ b/src/mac/mac.h @@ -36,7 +36,7 @@ class BOTAN_DLL MessageAuthenticationCode : public BufferedComputation, /** * Get the name of this algorithm. - * @return the name of this algorithm + * @return name of this algorithm */ virtual std::string name() const = 0; diff --git a/src/math/bigint/bigint.h b/src/math/bigint/bigint.h index cd1aebf00..81defd201 100644 --- a/src/math/bigint/bigint.h +++ b/src/math/bigint/bigint.h @@ -220,7 +220,7 @@ class BOTAN_DLL BigInt /** * Return the word at a specified position of the internal register * @param n position in the register - * @return the value at position n + * @return value at position n */ word word_at(u32bit n) const { return ((n < size()) ? reg[n] : 0); } @@ -371,7 +371,7 @@ class BOTAN_DLL BigInt * @param rng a random number generator * @param min the minimum value * @param max the maximum value - * @return a random integer between min and max + * @return random integer between min and max */ static BigInt random_integer(RandomNumberGenerator& rng, const BigInt& min, diff --git a/src/pubkey/dl_algo/dl_algo.h b/src/pubkey/dl_algo/dl_algo.h index 445f6c3f9..429bfb554 100644 --- a/src/pubkey/dl_algo/dl_algo.h +++ b/src/pubkey/dl_algo/dl_algo.h @@ -28,7 +28,7 @@ class BOTAN_DLL DL_Scheme_PublicKey : public virtual Public_Key /** * Get the DL domain parameters of this key. - * @return the DL domain parameters of this key + * @return DL domain parameters of this key */ const DL_Group& get_domain() const { return group; } @@ -39,25 +39,25 @@ class BOTAN_DLL DL_Scheme_PublicKey : public virtual Public_Key /** * Get the prime p of the underlying DL group. - * @return the prime p + * @return prime p */ const BigInt& group_p() const { return group.get_p(); } /** * Get the prime q of the underlying DL group. - * @return the prime q + * @return prime q */ const BigInt& group_q() const { return group.get_q(); } /** * Get the generator g of the underlying DL group. - * @return the generator g + * @return generator g */ const BigInt& group_g() const { return group.get_g(); } /** * Get the underlying groups encoding format. - * @return the encoding format + * @return encoding format */ virtual DL_Group::Format group_format() const = 0; @@ -82,7 +82,7 @@ class BOTAN_DLL DL_Scheme_PrivateKey : public virtual DL_Scheme_PublicKey, /** * Get the secret key x. - * @return the secret key + * @return secret key */ const BigInt& get_x() const { return x; } diff --git a/src/pubkey/dl_group/dl_group.h b/src/pubkey/dl_group/dl_group.h index a84a85f87..885ccd2f9 100644 --- a/src/pubkey/dl_group/dl_group.h +++ b/src/pubkey/dl_group/dl_group.h @@ -22,19 +22,19 @@ class BOTAN_DLL DL_Group public: /** * Get the prime p. - * @return the prime p + * @return prime p */ const BigInt& get_p() const; /** * Get the prime q. - * @return the prime q + * @return prime q */ const BigInt& get_q() const; /** * Get the base g. - * @return the base g + * @return base g */ const BigInt& get_g() const; @@ -68,14 +68,14 @@ class BOTAN_DLL DL_Group /** * Encode this group into a string using PEM encoding. * @param format the encoding format - * @return the string holding the PEM encoded group + * @return string holding the PEM encoded group */ std::string PEM_encode(Format format) const; /** * Encode this group into a string using DER encoding. * @param format the encoding format - * @return the string holding the DER encoded group + * @return string holding the DER encoded group */ SecureVector DER_encode(Format format) const; diff --git a/src/pubkey/ecdh/ecdh.h b/src/pubkey/ecdh/ecdh.h index ea1205a48..f0872c5cc 100644 --- a/src/pubkey/ecdh/ecdh.h +++ b/src/pubkey/ecdh/ecdh.h @@ -46,12 +46,12 @@ class BOTAN_DLL ECDH_PublicKey : public virtual EC_PublicKey * Get the maximum number of bits allowed to be fed to this key. * This is the bitlength of the order of the base point. - * @return the maximum number of input bits + * @return maximum number of input bits */ u32bit max_input_bits() const { return domain().get_order().bits(); } /** - * @return the public point value + * @return public point value */ MemoryVector public_value() const { return EC2OSP(public_point(), PointGFp::UNCOMPRESSED); } diff --git a/src/pubkey/if_algo/if_algo.h b/src/pubkey/if_algo/if_algo.h index 764a99e13..d0a1ec197 100644 --- a/src/pubkey/if_algo/if_algo.h +++ b/src/pubkey/if_algo/if_algo.h @@ -34,12 +34,12 @@ class BOTAN_DLL IF_Scheme_PublicKey : public virtual Public_Key MemoryVector x509_subject_public_key() const; /** - * @return the public modulus + * @return public modulus */ const BigInt& get_n() const { return n; } /** - * @return the public exponent + * @return public exponent */ const BigInt& get_e() const { return e; } @@ -73,13 +73,13 @@ class BOTAN_DLL IF_Scheme_PrivateKey : public virtual IF_Scheme_PublicKey, /** * Get the first prime p. - * @return the prime p + * @return prime p */ const BigInt& get_p() const { return p; } /** * Get the second prime q. - * @return the prime q + * @return prime q */ const BigInt& get_q() const { return q; } diff --git a/src/pubkey/pk_keys.h b/src/pubkey/pk_keys.h index b1036152d..8f086c617 100644 --- a/src/pubkey/pk_keys.h +++ b/src/pubkey/pk_keys.h @@ -23,13 +23,13 @@ class BOTAN_DLL Public_Key public: /** * Get the name of the underlying public key scheme. - * @return the name of the public key scheme + * @return name of the public key scheme */ virtual std::string algo_name() const = 0; /** * Get the OID of the underlying public key scheme. - * @return the OID of the public key scheme + * @return OID of the public key scheme */ virtual OID get_oid() const; @@ -45,19 +45,19 @@ class BOTAN_DLL Public_Key /** * Find out the number of message parts supported by this scheme. - * @return the number of message parts + * @return number of message parts */ virtual u32bit message_parts() const { return 1; } /** * Find out the message part size supported by this scheme/key. - * @return the size of the message parts + * @return size of the message parts in bits */ virtual u32bit message_part_size() const { return 0; } /** * Get the maximum message size in bits supported by this public key. - * @return the maximum message in bits + * @return maximum message size in bits */ virtual u32bit max_input_bits() const = 0; diff --git a/src/pubkey/pk_ops.h b/src/pubkey/pk_ops.h index 7a5b1d94d..b15a8d8cd 100644 --- a/src/pubkey/pk_ops.h +++ b/src/pubkey/pk_ops.h @@ -51,19 +51,19 @@ class BOTAN_DLL Signature public: /** * Find out the number of message parts supported by this scheme. - * @return the number of message parts + * @return number of message parts */ virtual u32bit message_parts() const { return 1; } /** * Find out the message part size supported by this scheme/key. - * @return the size of the message parts + * @return size of the message parts */ virtual u32bit message_part_size() const { return 0; } /** * Get the maximum message size in bits supported by this public key. - * @return the maximum message in bits + * @return maximum message in bits */ virtual u32bit max_input_bits() const = 0; @@ -87,19 +87,19 @@ class BOTAN_DLL Verification public: /** * Get the maximum message size in bits supported by this public key. - * @return the maximum message in bits + * @return maximum message in bits */ virtual u32bit max_input_bits() const = 0; /** * Find out the number of message parts supported by this scheme. - * @return the number of message parts + * @return number of message parts */ virtual u32bit message_parts() const { return 1; } /** * Find out the message part size supported by this scheme/key. - * @return the size of the message parts + * @return size of the message parts */ virtual u32bit message_part_size() const { return 0; } diff --git a/src/pubkey/pkcs8.h b/src/pubkey/pkcs8.h index 542d5bb2d..3da96d840 100644 --- a/src/pubkey/pkcs8.h +++ b/src/pubkey/pkcs8.h @@ -34,7 +34,7 @@ BOTAN_DLL SecureVector BER_encode(const Private_Key& key); /** * Get a string containing a PEM encoded private key. * @param key the key to encode -* @return the encoded key +* @return encoded key */ BOTAN_DLL std::string PEM_encode(const Private_Key& key); @@ -46,7 +46,7 @@ BOTAN_DLL std::string PEM_encode(const Private_Key& key); * @param pbe_algo the name of the desired password-based encryption algorithm; if empty ("") a reasonable (portable/secure) default will be chosen. -* @return the encrypted key in binary BER form +* @return encrypted key in binary BER form */ BOTAN_DLL SecureVector BER_encode(const Private_Key& key, RandomNumberGenerator& rng, @@ -62,7 +62,7 @@ BOTAN_DLL SecureVector BER_encode(const Private_Key& key, * @param pbe_algo the name of the desired password-based encryption algorithm; if empty ("") a reasonable (portable/secure) default will be chosen. -* @return the encrypted key in PEM form +* @return encrypted key in PEM form */ BOTAN_DLL std::string PEM_encode(const Private_Key& key, RandomNumberGenerator& rng, @@ -119,7 +119,7 @@ inline void encrypt_key(const Private_Key& key, * @param source the data source providing the encoded key * @param rng the rng to use * @param ui the user interface to be used for passphrase dialog -* @return the loaded private key object +* @return loaded private key object */ BOTAN_DLL Private_Key* load_key(DataSource& source, RandomNumberGenerator& rng, @@ -130,7 +130,7 @@ BOTAN_DLL Private_Key* load_key(DataSource& source, * @param rng the rng to use * @param pass the passphrase to decrypt the key. Provide an empty * string if the key is not encoded. -* @return the loaded private key object +* @return loaded private key object */ BOTAN_DLL Private_Key* load_key(DataSource& source, RandomNumberGenerator& rng, @@ -141,7 +141,7 @@ BOTAN_DLL Private_Key* load_key(DataSource& source, * @param filename the path to the file containing the encoded key * @param rng the rng to use * @param ui the user interface to be used for passphrase dialog -* @return the loaded private key object +* @return loaded private key object */ BOTAN_DLL Private_Key* load_key(const std::string& filename, RandomNumberGenerator& rng, @@ -152,7 +152,7 @@ BOTAN_DLL Private_Key* load_key(const std::string& filename, * @param rng the rng to use * @param pass the passphrase to decrypt the key. Provide an empty * string if the key is not encoded. -* @return the loaded private key object +* @return loaded private key object */ BOTAN_DLL Private_Key* load_key(const std::string& filename, RandomNumberGenerator& rng, @@ -162,7 +162,7 @@ BOTAN_DLL Private_Key* load_key(const std::string& filename, * Copy an existing encoded key object. * @param key the key to copy * @param rng the rng to use -* @return the new copy of the key +* @return new copy of the key */ BOTAN_DLL Private_Key* copy_key(const Private_Key& key, RandomNumberGenerator& rng); diff --git a/src/pubkey/pubkey.h b/src/pubkey/pubkey.h index d034427e1..ff4355675 100644 --- a/src/pubkey/pubkey.h +++ b/src/pubkey/pubkey.h @@ -43,7 +43,7 @@ class BOTAN_DLL PK_Encryptor * @param in the message as a byte array * @param length the length of the above byte array * @param rng the random number source to use - * @return the encrypted message + * @return encrypted message */ SecureVector encrypt(const byte in[], u32bit length, RandomNumberGenerator& rng) const @@ -55,7 +55,7 @@ class BOTAN_DLL PK_Encryptor * Encrypt a message. * @param in the message * @param rng the random number source to use - * @return the encrypted message + * @return encrypted message */ SecureVector encrypt(const MemoryRegion& in, RandomNumberGenerator& rng) const @@ -65,7 +65,7 @@ class BOTAN_DLL PK_Encryptor /** * Return the maximum allowed message size in bytes. - * @return the maximum message size in bytes + * @return maximum message size in bytes */ virtual u32bit maximum_input_size() const = 0; @@ -89,7 +89,7 @@ class BOTAN_DLL PK_Decryptor * Decrypt a ciphertext. * @param in the ciphertext as a byte array * @param length the length of the above byte array - * @return the decrypted message + * @return decrypted message */ SecureVector decrypt(const byte in[], u32bit length) const { @@ -99,7 +99,7 @@ class BOTAN_DLL PK_Decryptor /** * Decrypt a ciphertext. * @param in the ciphertext - * @return the decrypted message + * @return decrypted message */ SecureVector decrypt(const MemoryRegion& in) const { @@ -128,7 +128,7 @@ class BOTAN_DLL PK_Signer * @param in the message to sign as a byte array * @param length the length of the above byte array * @param rng the rng to use - * @return the signature + * @return signature */ SecureVector sign_message(const byte in[], u32bit length, RandomNumberGenerator& rng); @@ -137,7 +137,7 @@ class BOTAN_DLL PK_Signer * Sign a message. * @param in the message to sign * @param rng the rng to use - * @return the signature + * @return signature */ SecureVector sign_message(const MemoryRegion& in, RandomNumberGenerator& rng) @@ -166,7 +166,7 @@ class BOTAN_DLL PK_Signer * Get the signature of the so far processed message (provided by the * calls to update()). * @param rng the rng to use - * @return the signature of the total message + * @return signature of the total message */ SecureVector signature(RandomNumberGenerator& rng); diff --git a/src/s2k/s2k.h b/src/s2k/s2k.h index 5263dfd68..59e789a15 100644 --- a/src/s2k/s2k.h +++ b/src/s2k/s2k.h @@ -21,13 +21,13 @@ class BOTAN_DLL S2K public: /** - * @return a new instance of this same algorithm + * @return new instance of this same algorithm */ virtual S2K* clone() const = 0; /** * Get the algorithm name. - * @return the name of this S2K algorithm + * @return name of this S2K algorithm */ virtual std::string name() const = 0; diff --git a/src/sym_algo/sym_algo.h b/src/sym_algo/sym_algo.h index f1a4955ca..60180de90 100644 --- a/src/sym_algo/sym_algo.h +++ b/src/sym_algo/sym_algo.h @@ -38,7 +38,7 @@ class BOTAN_DLL SymmetricAlgorithm /** * The name of the algorithm. - * @return the name of the algorithm + * @return name of the algorithm */ virtual std::string name() const = 0; diff --git a/src/utils/buf_comp/buf_comp.h b/src/utils/buf_comp/buf_comp.h index 6ec21c0d0..e807e6abf 100644 --- a/src/utils/buf_comp/buf_comp.h +++ b/src/utils/buf_comp/buf_comp.h @@ -67,7 +67,7 @@ class BOTAN_DLL BufferedComputation /** * Complete the computation and retrieve the * final result. - * @return a SecureVector holding the result + * @return SecureVector holding the result */ SecureVector final() { diff --git a/src/utils/version.h b/src/utils/version.h index 9ed776ed7..13d0ac8bb 100644 --- a/src/utils/version.h +++ b/src/utils/version.h @@ -19,7 +19,7 @@ namespace Botan { /** * Get the version string identifying the version of Botan. -* @return the version string +* @return version string */ BOTAN_DLL std::string version_string(); @@ -27,25 +27,25 @@ BOTAN_DLL std::string version_string(); * Return the date this version of botan was released, in an * integer of the form YYYYMMDD. For instance a version released * on May 21, 2013 would return the integer 20130521 -* @return the release date +* @return release date */ BOTAN_DLL u32bit version_datestamp(); /** * Get the major version number. -* @return the major version number +* @return major version number */ BOTAN_DLL u32bit version_major(); /** * Get the minor version number. -* @return the minor version number +* @return minor version number */ BOTAN_DLL u32bit version_minor(); /** * Get the patch number. -* @return the patch number +* @return patch number */ BOTAN_DLL u32bit version_patch(); -- cgit v1.2.3