aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/modes/mode_pad/mode_pad.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/modes/mode_pad/mode_pad.cpp')
-rw-r--r--src/lib/modes/mode_pad/mode_pad.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/modes/mode_pad/mode_pad.cpp b/src/lib/modes/mode_pad/mode_pad.cpp
index ecf241821..0f1df9e8a 100644
--- a/src/lib/modes/mode_pad/mode_pad.cpp
+++ b/src/lib/modes/mode_pad/mode_pad.cpp
@@ -37,7 +37,7 @@ void PKCS7_Padding::add_padding(secure_vector<byte>& buffer,
size_t last_byte_pos,
size_t block_size) const
{
- const byte pad_value = block_size - last_byte_pos;
+ const byte pad_value = static_cast<byte>(block_size - last_byte_pos);
for(size_t i = 0; i != pad_value; ++i)
buffer.push_back(pad_value);
@@ -67,7 +67,7 @@ void ANSI_X923_Padding::add_padding(secure_vector<byte>& buffer,
size_t last_byte_pos,
size_t block_size) const
{
- const byte pad_value = block_size - last_byte_pos;
+ const byte pad_value = static_cast<byte>(block_size - last_byte_pos);
for(size_t i = last_byte_pos; i < block_size; ++i)
buffer.push_back(0);