aboutsummaryrefslogtreecommitdiffstats
path: root/src/stream/ctr/ctr.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-05-25 22:52:00 +0000
committerlloyd <[email protected]>2012-05-25 22:52:00 +0000
commit12090a7148d9ee73572cc1a7268fc489504a8173 (patch)
tree51e50ce0852c56231e9e6dc13f168b10edd45d01 /src/stream/ctr/ctr.cpp
parent9594979caf775dc4062850044715b804d1fda60c (diff)
parent65cc04445f8d40497f02a14bd8cb97081790e54b (diff)
propagate from branch 'net.randombit.botan.x509-path-validation' (head 63b5a20eab129ca13287fda33d2d02eec329708f)
to branch 'net.randombit.botan' (head 8b8150f09c55184f028f2929c4e7f7cd0d46d96e)
Diffstat (limited to 'src/stream/ctr/ctr.cpp')
-rw-r--r--src/stream/ctr/ctr.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/stream/ctr/ctr.cpp b/src/stream/ctr/ctr.cpp
index 3a370eca3..87ec86c65 100644
--- a/src/stream/ctr/ctr.cpp
+++ b/src/stream/ctr/ctr.cpp
@@ -49,7 +49,7 @@ void CTR_BE::key_schedule(const byte key[], size_t key_len)
permutation->set_key(key, key_len);
// Set a default all-zeros IV
- set_iv(0, 0);
+ set_iv(nullptr, 0);
}
/*
@@ -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)])