aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-06-15 23:59:08 +0000
committerlloyd <[email protected]>2010-06-15 23:59:08 +0000
commitbb14aeadb3bc9137ae386460cd4d885b23d9a111 (patch)
tree80000869393480ae3818b3da1bc6361d416da18c /src
parent73446ab47ffe15d72f5bbd7f859788c641ac045a (diff)
More Doxygen
Diffstat (limited to 'src')
-rw-r--r--src/block/gost_28147/gost_28147.h15
-rw-r--r--src/block/lubyrack/lubyrack.h3
-rw-r--r--src/block/misty1/misty1.h6
-rw-r--r--src/block/rc5/rc5.h6
-rw-r--r--src/filters/filter.h7
-rw-r--r--src/filters/pipe.h17
-rw-r--r--src/filters/zlib/zlib.h10
-rw-r--r--src/hash/md4/md4.h1
-rw-r--r--src/hash/mdx_hash/mdx_hash.h14
-rw-r--r--src/hash/tiger/tiger.h7
10 files changed, 77 insertions, 9 deletions
diff --git a/src/block/gost_28147/gost_28147.h b/src/block/gost_28147/gost_28147.h
index 2ccb3214d..dbea932a0 100644
--- a/src/block/gost_28147/gost_28147.h
+++ b/src/block/gost_28147/gost_28147.h
@@ -21,14 +21,24 @@ namespace Botan {
class BOTAN_DLL GOST_28147_89_Params
{
public:
+ /**
+ * @param row the row
+ * @param col the column
+ * @return the sbox entry at this row/column
+ */
byte sbox_entry(u32bit row, u32bit col) const;
+ /**
+ * @return name of this parameter set
+ */
std::string param_name() const { return name; }
/**
* Default GOST parameters are the ones given in GOST R 34.11 for
* testing purposes; these sboxes are also used by Crypto++, and,
- * at least according to Wikipedia, the Central Bank of Russian Federation
+ * at least according to Wikipedia, the Central Bank of Russian
+ * Federation
+ * @param name of the parameter set
*/
GOST_28147_89_Params(const std::string& name = "R3411_94_TestParam");
private:
@@ -50,6 +60,9 @@ class BOTAN_DLL GOST_28147_89 : public BlockCipher
std::string name() const { return "GOST-28147-89"; }
BlockCipher* clone() const { return new GOST_28147_89(SBOX); }
+ /**
+ * @param params the sbox parameters to use
+ */
GOST_28147_89(const GOST_28147_89_Params& params);
private:
GOST_28147_89(const SecureVector<u32bit, 1024>& other_SBOX) :
diff --git a/src/block/lubyrack/lubyrack.h b/src/block/lubyrack/lubyrack.h
index 29b7ee5a4..a69d2302f 100644
--- a/src/block/lubyrack/lubyrack.h
+++ b/src/block/lubyrack/lubyrack.h
@@ -26,6 +26,9 @@ class BOTAN_DLL LubyRackoff : public BlockCipher
std::string name() const;
BlockCipher* clone() const;
+ /**
+ * @param hash function to use to form the block cipher
+ */
LubyRackoff(HashFunction* hash);
~LubyRackoff() { delete hash; }
private:
diff --git a/src/block/misty1/misty1.h b/src/block/misty1/misty1.h
index d58a2aac7..a9bc12c7b 100644
--- a/src/block/misty1/misty1.h
+++ b/src/block/misty1/misty1.h
@@ -25,7 +25,11 @@ class BOTAN_DLL MISTY1 : public BlockCipher
std::string name() const { return "MISTY1"; }
BlockCipher* clone() const { return new MISTY1; }
- MISTY1(u32bit = 8);
+ /**
+ * @param rounds the number of rounds. Must be 8 with the current
+ * implementation
+ */
+ MISTY1(u32bit rounds = 8);
private:
void key_schedule(const byte[], u32bit);
diff --git a/src/block/rc5/rc5.h b/src/block/rc5/rc5.h
index 5135336b1..385c6b2b1 100644
--- a/src/block/rc5/rc5.h
+++ b/src/block/rc5/rc5.h
@@ -25,7 +25,11 @@ class BOTAN_DLL RC5 : public BlockCipher
std::string name() const;
BlockCipher* clone() const { return new RC5(ROUNDS); }
- RC5(u32bit);
+ /**
+ * @param rounds the number of RC5 rounds to run. Must be between
+ * 8 and 32 and a multiple of 4.
+ */
+ RC5(u32bit rounds);
private:
void key_schedule(const byte[], u32bit);
SecureVector<u32bit> S;
diff --git a/src/filters/filter.h b/src/filters/filter.h
index e401e063c..62c67b922 100644
--- a/src/filters/filter.h
+++ b/src/filters/filter.h
@@ -84,7 +84,12 @@ class BOTAN_DLL Filter
u32bit total_ports() const;
u32bit current_port() const { return port_num; }
- void set_port(u32bit);
+
+ /**
+ * Set the active port
+ * @param new_port the new value
+ */
+ void set_port(u32bit new_port);
u32bit owns() const { return filter_owns; }
diff --git a/src/filters/pipe.h b/src/filters/pipe.h
index 3f3527177..4f66b51d9 100644
--- a/src/filters/pipe.h
+++ b/src/filters/pipe.h
@@ -25,6 +25,9 @@ namespace Botan {
class BOTAN_DLL Pipe : public DataSource
{
public:
+ /*
+ * An opaque type that identifies a message in this Pipe
+ */
typedef u32bit message_id;
/**
@@ -33,13 +36,24 @@ class BOTAN_DLL Pipe : public DataSource
*/
struct BOTAN_DLL Invalid_Message_Number : public Invalid_Argument
{
+ /**
+ * @param where the error occured
+ * @param msg the invalid message id that was used
+ */
Invalid_Message_Number(const std::string& where, message_id msg) :
Invalid_Argument("Pipe::" + where + ": Invalid message number " +
to_string(msg))
{}
};
+ /**
+ * A meta-id for whatever the last message is
+ */
static const message_id LAST_MESSAGE;
+
+ /**
+ * A meta-id for the default message (set with set_default_msg)
+ */
static const message_id DEFAULT_MESSAGE;
/**
@@ -186,6 +200,9 @@ class BOTAN_DLL Pipe : public DataSource
u32bit peek(byte& output, u32bit offset,
message_id msg = DEFAULT_MESSAGE) const;
+ /**
+ * @return currently set default message
+ */
u32bit default_msg() const { return default_read; }
/**
diff --git a/src/filters/zlib/zlib.h b/src/filters/zlib/zlib.h
index 5f82880de..2aa83aadf 100644
--- a/src/filters/zlib/zlib.h
+++ b/src/filters/zlib/zlib.h
@@ -23,9 +23,17 @@ class BOTAN_DLL Zlib_Compression : public Filter
void start_msg();
void end_msg();
+ /**
+ * Flush the compressor
+ */
void flush();
- Zlib_Compression(u32bit = 6);
+ /**
+ @param level how much effort to use on compressing (0 to 9);
+ higher levels are slower but tend to give better compression
+ */
+ Zlib_Compression(u32bit level = 6);
+
~Zlib_Compression() { clear(); }
private:
void clear();
diff --git a/src/hash/md4/md4.h b/src/hash/md4/md4.h
index 98a05b2dd..44d60406a 100644
--- a/src/hash/md4/md4.h
+++ b/src/hash/md4/md4.h
@@ -24,7 +24,6 @@ class BOTAN_DLL MD4 : public MDx_HashFunction
MD4() : MDx_HashFunction(16, 64, false, true) { clear(); }
protected:
void compress_n(const byte input[], u32bit blocks);
- void hash_old(const byte[]);
void copy_out(byte[]);
SecureVector<u32bit, 16> M;
diff --git a/src/hash/mdx_hash/mdx_hash.h b/src/hash/mdx_hash/mdx_hash.h
index aaf02449c..dbd1435ba 100644
--- a/src/hash/mdx_hash/mdx_hash.h
+++ b/src/hash/mdx_hash/mdx_hash.h
@@ -32,8 +32,18 @@ class BOTAN_DLL MDx_HashFunction : public HashFunction
virtual void compress_n(const byte blocks[], u32bit block_n) = 0;
void clear();
- virtual void copy_out(byte[]) = 0;
- virtual void write_count(byte[]);
+
+ /**
+ * Copy the output to the buffer
+ * @param buffer to put the output into
+ */
+ virtual void copy_out(byte buffer[]) = 0;
+
+ /**
+ * Write the count, if used, to this spot
+ * @param out where to write the counter to
+ */
+ virtual void write_count(byte out[]);
private:
SecureVector<byte> buffer;
u64bit count;
diff --git a/src/hash/tiger/tiger.h b/src/hash/tiger/tiger.h
index c38df02e7..441b83664 100644
--- a/src/hash/tiger/tiger.h
+++ b/src/hash/tiger/tiger.h
@@ -21,7 +21,12 @@ class BOTAN_DLL Tiger : public MDx_HashFunction
void clear();
std::string name() const;
HashFunction* clone() const { return new Tiger(OUTPUT_LENGTH); }
- Tiger(u32bit = 24, u32bit = 3);
+
+ /**
+ * @param out_size specifies the output length; can be 16, 20, or 24
+ * @param passes to make in the algorithm
+ */
+ Tiger(u32bit out_size = 24, u32bit passes = 3);
private:
void compress_n(const byte[], u32bit block);
void copy_out(byte[]);