diff options
-rw-r--r-- | src/kdf/x942_prf/prf_x942.cpp | 2 | ||||
-rw-r--r-- | src/libstate/lookup.cpp | 4 | ||||
-rw-r--r-- | src/libstate/lookup.h | 4 | ||||
-rw-r--r-- | src/stream/arc4/arc4.cpp | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/kdf/x942_prf/prf_x942.cpp b/src/kdf/x942_prf/prf_x942.cpp index 966d883b6..fc31effe4 100644 --- a/src/kdf/x942_prf/prf_x942.cpp +++ b/src/kdf/x942_prf/prf_x942.cpp @@ -62,7 +62,7 @@ SecureVector<byte> X942_PRF::derive(size_t key_len, ) .start_explicit(2) - .raw_bytes(encode_x942_int(8 * key_len)) + .raw_bytes(encode_x942_int(static_cast<u32bit>(8 * key_len))) .end_explicit() .end_cons().get_contents() diff --git a/src/libstate/lookup.cpp b/src/libstate/lookup.cpp index f5d2c5a0c..24a46e3e9 100644 --- a/src/libstate/lookup.cpp +++ b/src/libstate/lookup.cpp @@ -32,7 +32,7 @@ bool have_algorithm(const std::string& name) /* * Query the block size of a cipher or hash */ -u32bit block_size_of(const std::string& name) +size_t block_size_of(const std::string& name) { Algorithm_Factory& af = global_state().algorithm_factory(); @@ -48,7 +48,7 @@ u32bit block_size_of(const std::string& name) /* * Query the output_length() of a hash or MAC */ -u32bit output_length_of(const std::string& name) +size_t output_length_of(const std::string& name) { Algorithm_Factory& af = global_state().algorithm_factory(); diff --git a/src/libstate/lookup.h b/src/libstate/lookup.h index f1e1a52ca..02c1708aa 100644 --- a/src/libstate/lookup.h +++ b/src/libstate/lookup.h @@ -288,7 +288,7 @@ inline bool have_mac(const std::string& algo_spec) * @param algo_spec the name of the algorithm * @return block size of the specified algorithm */ -BOTAN_DLL u32bit block_size_of(const std::string& algo_spec); +BOTAN_DLL size_t block_size_of(const std::string& algo_spec); /** * Find out the output length of a certain symmetric algorithm. @@ -297,7 +297,7 @@ BOTAN_DLL u32bit block_size_of(const std::string& algo_spec); * @param algo_spec the name of the algorithm * @return output length of the specified algorithm */ -BOTAN_DLL u32bit output_length_of(const std::string& algo_spec); +BOTAN_DLL size_t output_length_of(const std::string& algo_spec); } diff --git a/src/stream/arc4/arc4.cpp b/src/stream/arc4/arc4.cpp index cd6230022..6eea7bb45 100644 --- a/src/stream/arc4/arc4.cpp +++ b/src/stream/arc4/arc4.cpp @@ -64,7 +64,7 @@ void ARC4::key_schedule(const byte key[], size_t length) clear(); for(size_t i = 0; i != 256; ++i) - state[i] = i; + state[i] = static_cast<byte>(i); for(size_t i = 0, state_index = 0; i != 256; ++i) { |