From 9dc1fe2b5ca62adc2da69e1b55d9fa880833b2ca Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 13 Oct 2010 13:15:20 +0000 Subject: Remove the upto argument to update_be --- src/utils/buf_comp/buf_comp.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/utils') 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 void update_be(const T in, size_t upto = sizeof(T)) + /** + * Add an integer in big-endian order + * @param in the value + */ + template 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); -- cgit v1.2.3