aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/stream/stream_cipher.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/stream/stream_cipher.h')
-rw-r--r--src/lib/stream/stream_cipher.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/stream/stream_cipher.h b/src/lib/stream/stream_cipher.h
index 03ffcadd0..fee37f4e4 100644
--- a/src/lib/stream/stream_cipher.h
+++ b/src/lib/stream/stream_cipher.h
@@ -101,6 +101,12 @@ class BOTAN_PUBLIC_API(2,0) StreamCipher : public SymmetricAlgorithm
virtual void set_iv(const uint8_t iv[], size_t iv_len) = 0;
/**
+ * Return the default (preferred) nonce length
+ * If this function returns 0, then this cipher does not support nonces
+ */
+ virtual size_t default_iv_length() const { return 0; }
+
+ /**
* @param iv_len the length of the IV in bytes
* @return if the length is valid for this algorithm
*/