aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/stream/ctr
diff options
context:
space:
mode:
authorSimCog <[email protected]>2016-06-14 18:21:10 +0200
committerSimCog <[email protected]>2016-06-18 01:06:21 +0200
commit00337c4ea2af6b1727be0bdf9b719c98760a14fd (patch)
treeadc8b6f68311b2c9649bdb84766f22f99d2424db /src/lib/stream/ctr
parent6816c9e71e01432792a997ad9a5d561b9cd94a48 (diff)
Adding StreamCipher::seek interface, supporting seek in ChaCha, and also adding ChaCha8 support
Diffstat (limited to 'src/lib/stream/ctr')
-rw-r--r--src/lib/stream/ctr/ctr.cpp4
-rw-r--r--src/lib/stream/ctr/ctr.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/stream/ctr/ctr.cpp b/src/lib/stream/ctr/ctr.cpp
index f5301c099..43609ba2d 100644
--- a/src/lib/stream/ctr/ctr.cpp
+++ b/src/lib/stream/ctr/ctr.cpp
@@ -125,4 +125,8 @@ void CTR_BE::increment_counter()
m_pad_pos = 0;
}
+void CTR_BE::seek(u64bit)
+ {
+ throw Not_Implemented("CTR_BE::seek");
+ }
}
diff --git a/src/lib/stream/ctr/ctr.h b/src/lib/stream/ctr/ctr.h
index 003297b92..5d5556254 100644
--- a/src/lib/stream/ctr/ctr.h
+++ b/src/lib/stream/ctr/ctr.h
@@ -46,6 +46,8 @@ class BOTAN_DLL CTR_BE final : public StreamCipher
explicit CTR_BE(BlockCipher* cipher);
CTR_BE(BlockCipher* cipher, size_t ctr_size);
+
+ void seek(u64bit offset) override;
private:
void key_schedule(const byte key[], size_t key_len) override;
void increment_counter();