aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-06-16 04:16:42 +0000
committerlloyd <[email protected]>2010-06-16 04:16:42 +0000
commit20705c98a816a8da54aacc110f79c0ed53ba1349 (patch)
tree5aa30e40cba01ccb1bd91ec6513408bae269c319 /src/utils
parenta87419f1304aa63b0b4e17f750f5dd2097cb8bf4 (diff)
parenta8a86e17906701393c7038967541935af5144946 (diff)
merge of '3632315d498b1223cca850051518f7a3273f5449'
and '5c9cdb3b727e7336f0a18f72e6ca2eb7460d31ec'
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/buf_comp/buf_comp.h21
-rw-r--r--src/utils/time.h11
-rw-r--r--src/utils/version.h10
3 files changed, 33 insertions, 9 deletions
diff --git a/src/utils/buf_comp/buf_comp.h b/src/utils/buf_comp/buf_comp.h
index bbaa72919..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<byte> final()
{
@@ -113,12 +113,27 @@ class BOTAN_DLL BufferedComputation
return final();
}
+ /**
+ * @param out_len the output length of this computation
+ */
BufferedComputation(u32bit out_len) : OUTPUT_LENGTH(out_len) {}
+
virtual ~BufferedComputation() {}
private:
BufferedComputation& operator=(const BufferedComputation&);
- virtual void add_data(const byte[], u32bit) = 0;
- virtual void final_result(byte[]) = 0;
+
+ /**
+ * Add more data to the computation
+ * @param input is an input buffer
+ * @param length is the length of input in bytes
+ */
+ virtual void add_data(const byte input[], u32bit length) = 0;
+
+ /**
+ * Write the final output to out
+ * @param out is an output buffer of OUTPUT_LENGTH
+ */
+ virtual void final_result(byte out[]) = 0;
};
}
diff --git a/src/utils/time.h b/src/utils/time.h
index c1ab52021..fa1e379a7 100644
--- a/src/utils/time.h
+++ b/src/utils/time.h
@@ -25,13 +25,22 @@ struct BOTAN_DLL calendar_point
byte minutes;
byte seconds;
+ /**
+ * Initialize a calendar_point
+ * @param y the year
+ * @param mon the month
+ * @param d the day
+ * @param h the hour
+ * @param min the minute
+ * @param sec the second
+ */
calendar_point(u32bit y, byte mon, byte d, byte h, byte min, byte sec) :
year(y), month(mon), day(d), hour(h), minutes(min), seconds(sec) {}
};
/**
* @param time_point a time point from the system clock
-* @returns calendar_point object representing this time point
+* @return calendar_point object representing this time point
*/
BOTAN_DLL calendar_point calendar_value(u64bit time_point);
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();