aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/stream/stream_cipher.h
diff options
context:
space:
mode:
authorRenĂ© Korthaus <[email protected]>2016-10-16 17:19:18 +0200
committerRenĂ© Korthaus <[email protected]>2016-10-19 09:13:34 +0200
commit446f2a0289cca0de11e748e73071a39c06940239 (patch)
treec22651dea9e9505341e92fbb33d7b488b6444980 /src/lib/stream/stream_cipher.h
parenta08e0160301f20e4f5d620a146a1556e0ac7c95d (diff)
Improve stream doxygen [ci skip]
Diffstat (limited to 'src/lib/stream/stream_cipher.h')
-rw-r--r--src/lib/stream/stream_cipher.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/lib/stream/stream_cipher.h b/src/lib/stream/stream_cipher.h
index b24a99e39..a5ecc373b 100644
--- a/src/lib/stream/stream_cipher.h
+++ b/src/lib/stream/stream_cipher.h
@@ -23,14 +23,16 @@ class BOTAN_DLL StreamCipher : public SymmetricAlgorithm
/**
* Create an instance based on a name
- * Will return a null pointer if the algo/provider combination cannot
- * be found. If provider is empty then best available is chosen.
+ * If provider is empty then best available is chosen.
+ * @param algo_spec algorithm name
+ * @param provider provider implementation to use
+ * @return a null pointer if the algo/provider combination cannot be found
*/
static std::unique_ptr<StreamCipher> create(const std::string& algo_spec,
const std::string& provider = "");
/**
- * Returns the list of available providers for this algorithm, empty if not available
+ * @return list of available providers for this algorithm, empty if not available
*/
static std::vector<std::string> providers(const std::string& algo_spec);
@@ -44,20 +46,36 @@ class BOTAN_DLL StreamCipher : public SymmetricAlgorithm
/**
* Encrypt or decrypt a message
+ * The message is encrypted/decrypted in place.
* @param buf the plaintext / ciphertext
* @param len the length of buf in bytes
*/
void cipher1(byte buf[], size_t len)
{ cipher(buf, buf, len); }
+ /**
+ * Encrypt a message
+ * The message is encrypted/decrypted in place.
+ * @param inout the plaintext / ciphertext
+ */
template<typename Alloc>
void encipher(std::vector<byte, Alloc>& inout)
{ cipher(inout.data(), inout.data(), inout.size()); }
+ /**
+ * Encrypt a message
+ * The message is encrypted in place.
+ * @param inout the plaintext / ciphertext
+ */
template<typename Alloc>
void encrypt(std::vector<byte, Alloc>& inout)
{ cipher(inout.data(), inout.data(), inout.size()); }
+ /**
+ * Decrypt a message in place
+ * The message is decrypted in place.
+ * @param inout the plaintext / ciphertext
+ */
template<typename Alloc>
void decrypt(std::vector<byte, Alloc>& inout)
{ cipher(inout.data(), inout.data(), inout.size()); }
@@ -76,7 +94,7 @@ class BOTAN_DLL StreamCipher : public SymmetricAlgorithm
virtual bool valid_iv_length(size_t iv_len) const { return (iv_len == 0); }
/**
- * Get a new object representing the same algorithm as *this
+ * @return a new object representing the same algorithm as *this
*/
virtual StreamCipher* clone() const = 0;