aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/modes/cfb/cfb.cpp
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/modes/cfb/cfb.cpp
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/modes/cfb/cfb.cpp')
-rw-r--r--src/lib/modes/cfb/cfb.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/modes/cfb/cfb.cpp b/src/lib/modes/cfb/cfb.cpp
index 2d1477e27..148e16c6c 100644
--- a/src/lib/modes/cfb/cfb.cpp
+++ b/src/lib/modes/cfb/cfb.cpp
@@ -70,12 +70,12 @@ bool CFB_Mode::valid_nonce_length(size_t n) const
return (n == cipher().block_size());
}
-void CFB_Mode::key_schedule(const byte key[], size_t length)
+void CFB_Mode::key_schedule(const uint8_t key[], size_t length)
{
m_cipher->set_key(key, length);
}
-void CFB_Mode::start_msg(const byte nonce[], size_t nonce_len)
+void CFB_Mode::start_msg(const uint8_t nonce[], size_t nonce_len)
{
if(!valid_nonce_length(nonce_len))
throw Invalid_IV_Length(name(), nonce_len);
@@ -89,7 +89,7 @@ size_t CFB_Encryption::process(uint8_t buf[], size_t sz)
{
const size_t BS = cipher().block_size();
- secure_vector<byte>& state = shift_register();
+ secure_vector<uint8_t>& state = shift_register();
const size_t shift = feedback();
size_t left = sz;
@@ -112,7 +112,7 @@ size_t CFB_Encryption::process(uint8_t buf[], size_t sz)
return sz;
}
-void CFB_Encryption::finish(secure_vector<byte>& buffer, size_t offset)
+void CFB_Encryption::finish(secure_vector<uint8_t>& buffer, size_t offset)
{
update(buffer, offset);
}
@@ -121,7 +121,7 @@ size_t CFB_Decryption::process(uint8_t buf[], size_t sz)
{
const size_t BS = cipher().block_size();
- secure_vector<byte>& state = shift_register();
+ secure_vector<uint8_t>& state = shift_register();
const size_t shift = feedback();
size_t left = sz;
@@ -148,7 +148,7 @@ size_t CFB_Decryption::process(uint8_t buf[], size_t sz)
return sz;
}
-void CFB_Decryption::finish(secure_vector<byte>& buffer, size_t offset)
+void CFB_Decryption::finish(secure_vector<uint8_t>& buffer, size_t offset)
{
update(buffer, offset);
}