diff options
author | lloyd <lloyd@randombit.net> | 2010-06-15 23:23:49 +0000 |
---|---|---|
committer | lloyd <lloyd@randombit.net> | 2010-06-15 23:23:49 +0000 |
commit | 76b57a7c4656f0f5759c34efe8bab664b49cd21d (patch) | |
tree | 04d4b4d871606e55bec9bddc8fcb57ddd238d21d | |
parent | bbe5daf0647a2f0953f1d99272b4e8fbf8d3b6b5 (diff) |
More Doxygen updates/fixes
123 files changed, 417 insertions, 236 deletions
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<typename Derived> // 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<byte>&) = 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<byte> 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<byte> 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<OID> 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<OID> 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<byte> 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<X509_Certificate> 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<CRL_Data> revoked - */ - class BOTAN_DLL CRL_Data - { - public: - X509_DN issuer; - MemoryVector<byte> 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<byte> 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<byte> 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<byte> 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<byte> 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<byte> 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<byte> 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<u64bit, 80> 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<K, V>& mapping, const K& key, return found_result; } -/* +/** * Function adaptor for delete operation */ template<class T> @@ -62,7 +62,7 @@ class del_fun : public std::unary_function<T, void> void operator()(T* ptr) { delete ptr; } }; -/* +/** * Delete the second half of a pair of objects */ template<typename Pair> @@ -71,7 +71,7 @@ void delete2nd(Pair& pair) delete pair.second; } -/* +/** * Insert a key/value pair into a multimap */ template<typename K, typename V> 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 { |