diff options
author | lloyd <[email protected]> | 2010-10-13 13:15:20 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-10-13 13:15:20 +0000 |
commit | 9dc1fe2b5ca62adc2da69e1b55d9fa880833b2ca (patch) | |
tree | 912c7b12d2ae03b974c1641956b8786a2dd387c6 /src/utils | |
parent | 3f641af95c6ce8bebc7afa5d75ae41c6da0d7714 (diff) |
Remove the upto argument to update_be
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/buf_comp/buf_comp.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/utils/buf_comp/buf_comp.h b/src/utils/buf_comp/buf_comp.h index a64d807dd..0b0ef6e16 100644 --- a/src/utils/buf_comp/buf_comp.h +++ b/src/utils/buf_comp/buf_comp.h @@ -14,9 +14,8 @@ namespace Botan { /** -* This class represents any kind of computation which -* uses an internal state, -* such as hash functions. +* This class represents any kind of computation which uses an internal +* state, such as hash functions or MACs */ class BOTAN_DLL BufferedComputation { @@ -48,9 +47,13 @@ class BOTAN_DLL BufferedComputation add_data(&in[0], in.size()); } - template<typename T> void update_be(const T in, size_t upto = sizeof(T)) + /** + * Add an integer in big-endian order + * @param in the value + */ + template<typename T> void update_be(const T in) { - for(size_t i = 0; i != std::min(upto, sizeof(T)); ++i) + for(size_t i = 0; i != sizeof(T); ++i) { byte b = get_byte(i, in); add_data(&b, 1); |