aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/stream/stream_cipher.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-12-11 15:28:38 -0500
committerJack Lloyd <[email protected]>2016-12-18 16:48:24 -0500
commitf3cb3edb512bdcab498d825886c3366c341b3f78 (patch)
tree645c73ec295a5a34f25d99903b6d9fa9751e86d3 /src/lib/stream/stream_cipher.h
parentc1dd21253c1f3188ff45d3ad47698efd08235ae8 (diff)
Convert to using standard uintN_t integer types
Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them.
Diffstat (limited to 'src/lib/stream/stream_cipher.h')
-rw-r--r--src/lib/stream/stream_cipher.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/stream/stream_cipher.h b/src/lib/stream/stream_cipher.h
index 7654bf427..3c843cb87 100644
--- a/src/lib/stream/stream_cipher.h
+++ b/src/lib/stream/stream_cipher.h
@@ -54,7 +54,7 @@ class BOTAN_DLL StreamCipher : public SymmetricAlgorithm
* @param out the byte array to hold the output, i.e. the ciphertext
* @param len the length of both in and out in bytes
*/
- virtual void cipher(const byte in[], byte out[], size_t len) = 0;
+ virtual void cipher(const uint8_t in[], uint8_t out[], size_t len) = 0;
/**
* Encrypt or decrypt a message
@@ -62,7 +62,7 @@ class BOTAN_DLL StreamCipher : public SymmetricAlgorithm
* @param buf the plaintext / ciphertext
* @param len the length of buf in bytes
*/
- void cipher1(byte buf[], size_t len)
+ void cipher1(uint8_t buf[], size_t len)
{ cipher(buf, buf, len); }
/**
@@ -71,7 +71,7 @@ class BOTAN_DLL StreamCipher : public SymmetricAlgorithm
* @param inout the plaintext / ciphertext
*/
template<typename Alloc>
- void encipher(std::vector<byte, Alloc>& inout)
+ void encipher(std::vector<uint8_t, Alloc>& inout)
{ cipher(inout.data(), inout.data(), inout.size()); }
/**
@@ -80,7 +80,7 @@ class BOTAN_DLL StreamCipher : public SymmetricAlgorithm
* @param inout the plaintext / ciphertext
*/
template<typename Alloc>
- void encrypt(std::vector<byte, Alloc>& inout)
+ void encrypt(std::vector<uint8_t, Alloc>& inout)
{ cipher(inout.data(), inout.data(), inout.size()); }
/**
@@ -89,7 +89,7 @@ class BOTAN_DLL StreamCipher : public SymmetricAlgorithm
* @param inout the plaintext / ciphertext
*/
template<typename Alloc>
- void decrypt(std::vector<byte, Alloc>& inout)
+ void decrypt(std::vector<uint8_t, Alloc>& inout)
{ cipher(inout.data(), inout.data(), inout.size()); }
/**
@@ -97,7 +97,7 @@ class BOTAN_DLL StreamCipher : public SymmetricAlgorithm
* @param iv the initialization vector
* @param iv_len the length of the IV in bytes
*/
- virtual void set_iv(const byte iv[], size_t iv_len) = 0;
+ virtual void set_iv(const uint8_t iv[], size_t iv_len) = 0;
/**
* @param iv_len the length of the IV in bytes
@@ -114,7 +114,7 @@ class BOTAN_DLL StreamCipher : public SymmetricAlgorithm
* Set the offset and the state used later to generate the keystream
* @param offset the offset where we begin to generate the keystream
*/
- virtual void seek(u64bit offset) = 0;
+ virtual void seek(uint64_t offset) = 0;
/**
* @return provider information about this implementation. Default is "base",