aboutsummaryrefslogtreecommitdiffstats
path: root/src/stream/ctr
diff options
context:
space:
mode:
authorlloyd <lloyd@randombit.net>2012-05-18 13:58:23 +0000
committerlloyd <lloyd@randombit.net>2012-05-18 13:58:23 +0000
commit2c3dc93d6466a9215d585613fb55f5222ce70d10 (patch)
tree9d44c738fdbb79103bed2d34c8fb171f8eaa00a2 /src/stream/ctr
parentc2d0d2982e96ab7ce15e90b8d73c9774e2650d86 (diff)
First step towards replacing the existing containers with std::vector
with a custom allocator; remove the 3 argument version of MemoryRegion::copy, replacing with freestanding buffer_insert function.
Diffstat (limited to 'src/stream/ctr')
-rw-r--r--src/stream/ctr/ctr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stream/ctr/ctr.cpp b/src/stream/ctr/ctr.cpp
index 3a370eca3..8ceac858a 100644
--- a/src/stream/ctr/ctr.cpp
+++ b/src/stream/ctr/ctr.cpp
@@ -89,14 +89,14 @@ void CTR_BE::set_iv(const byte iv[], size_t iv_len)
zeroise(counter);
- counter.copy(0, iv, iv_len);
+ buffer_insert(counter, 0, iv, iv_len);
/*
* Set counter blocks to IV, IV + 1, ... IV + 255
*/
for(size_t i = 1; i != 256; ++i)
{
- counter.copy(i*bs, &counter[(i-1)*bs], bs);
+ buffer_insert(counter, i*bs, &counter[(i-1)*bs], bs);
for(size_t j = 0; j != bs; ++j)
if(++counter[i*bs + (bs - 1 - j)])