From 7c7958ccc0d48a0ec54a58585fa1ae482b6e1eb8 Mon Sep 17 00:00:00 2001 From: weidai Date: Mon, 24 Feb 2003 01:06:41 +0000 Subject: fix whitespace problems --- modes.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'modes.cpp') diff --git a/modes.cpp b/modes.cpp index e573d3ce..70c23234 100644 --- a/modes.cpp +++ b/modes.cpp @@ -74,23 +74,23 @@ void CTR_ModePolicy::SeekToIteration(dword iterationCount) static inline void IncrementCounterByOne(byte *inout, unsigned int s) { - for (int i=s-1, carry=1; i>=0 && carry; i--) - carry = !++inout[i]; + for (int i=s-1, carry=1; i>=0 && carry; i--) + carry = !++inout[i]; } static inline void IncrementCounterByOne(byte *output, const byte *input, unsigned int s) { - for (int i=s-1, carry=1; i>=0; i--) - carry = !(output[i] = input[i]+carry) && carry; + for (int i=s-1, carry=1; i>=0; i--) + carry = !(output[i] = input[i]+carry) && carry; } -inline void CTR_ModePolicy::ProcessMultipleBlocks(byte *output, const byte *input, unsigned int n) +inline void CTR_ModePolicy::ProcessMultipleBlocks(byte *output, const byte *input, unsigned int n) { - unsigned int s = BlockSize(), j = 0; - for (unsigned int i=1; iProcessAndXorMultipleBlocks(m_counterArray, input, output, n); - IncrementCounterByOne(m_counterArray, m_counterArray + s*(n-1), s); + IncrementCounterByOne(m_counterArray, m_counterArray + s*(n-1), s); } void CTR_ModePolicy::OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, unsigned int iterationCount) -- cgit v1.2.1