diff options
Diffstat (limited to 'src/lib/modes/cipher_mode.h')
-rw-r--r-- | src/lib/modes/cipher_mode.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/modes/cipher_mode.h b/src/lib/modes/cipher_mode.h index 8bf58f10a..cdf16e37c 100644 --- a/src/lib/modes/cipher_mode.h +++ b/src/lib/modes/cipher_mode.h @@ -28,14 +28,14 @@ class BOTAN_DLL Cipher_Mode /* * Prepare for processing a message under the specified nonce */ - virtual void start_msg(const byte nonce[], size_t nonce_len) = 0; + virtual void start_msg(const uint8_t nonce[], size_t nonce_len) = 0; /** * Begin processing a message. * @param nonce the per message nonce */ template<typename Alloc> - void start(const std::vector<byte, Alloc>& nonce) + void start(const std::vector<uint8_t, Alloc>& nonce) { start_msg(nonce.data(), nonce.size()); } @@ -45,7 +45,7 @@ class BOTAN_DLL Cipher_Mode * @param nonce the per message nonce * @param nonce_len length of nonce */ - void start(const byte nonce[], size_t nonce_len) + void start(const uint8_t nonce[], size_t nonce_len) { start_msg(nonce, nonce_len); } @@ -74,14 +74,14 @@ class BOTAN_DLL Cipher_Mode virtual size_t process(uint8_t msg[], size_t msg_len) = 0; /** - * Process some data. Input must be in size update_granularity() byte blocks. + * Process some data. Input must be in size update_granularity() uint8_t blocks. * @param buffer in/out parameter which will possibly be resized * @param offset an offset into blocks to begin processing */ - void update(secure_vector<byte>& buffer, size_t offset = 0) + void update(secure_vector<uint8_t>& buffer, size_t offset = 0) { BOTAN_ASSERT(buffer.size() >= offset, "Offset ok"); - byte* buf = buffer.data() + offset; + uint8_t* buf = buffer.data() + offset; const size_t buf_size = buffer.size() - offset; const size_t written = process(buf, buf_size); @@ -95,7 +95,7 @@ class BOTAN_DLL Cipher_Mode * minimum_final_size() bytes, and will be set to any final output * @param offset an offset into final_block to begin processing */ - virtual void finish(secure_vector<byte>& final_block, size_t offset = 0) = 0; + virtual void finish(secure_vector<uint8_t>& final_block, size_t offset = 0) = 0; /** * Returns the size of the output if this transform is used to process a @@ -169,7 +169,7 @@ class BOTAN_DLL Cipher_Mode * @param key contains the key material */ template<typename Alloc> - void set_key(const std::vector<byte, Alloc>& key) + void set_key(const std::vector<uint8_t, Alloc>& key) { set_key(key.data(), key.size()); } @@ -188,7 +188,7 @@ class BOTAN_DLL Cipher_Mode * @param key contains the key material * @param length in bytes of key param */ - void set_key(const byte key[], size_t length) + void set_key(const uint8_t key[], size_t length) { if(!valid_keylength(length)) throw Invalid_Key_Length(name(), length); @@ -202,7 +202,7 @@ class BOTAN_DLL Cipher_Mode virtual std::string provider() const { return "base"; } private: - virtual void key_schedule(const byte key[], size_t length) = 0; + virtual void key_schedule(const uint8_t key[], size_t length) = 0; }; /** |