diff options
Diffstat (limited to 'src/lib/modes/ecb/ecb.cpp')
-rw-r--r-- | src/lib/modes/ecb/ecb.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/modes/ecb/ecb.cpp b/src/lib/modes/ecb/ecb.cpp index 6de00f18a..e5794d8e1 100644 --- a/src/lib/modes/ecb/ecb.cpp +++ b/src/lib/modes/ecb/ecb.cpp @@ -83,8 +83,10 @@ size_t ECB_Encryption::minimum_final_size() const size_t ECB_Encryption::output_length(size_t input_length) const { - BOTAN_ASSERT(input_length != 0, "ECB_Encryption::output_length() call"); - return round_up(input_length, cipher().block_size()); + if(input_length == 0) + return cipher().block_size(); + else + return round_up(input_length, cipher().block_size()); } void ECB_Encryption::update(secure_vector<byte>& buffer, size_t offset) |