diff options
author | lloyd <[email protected]> | 2010-10-13 14:58:58 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-10-13 14:58:58 +0000 |
commit | 6e85766cf001183e160c8ca2c0ed3eb40f07125c (patch) | |
tree | df11b301786829bc2f6f545038ec97c2269154d9 /src/constructs | |
parent | fcd3aba1ff6b8597b31165474573dbb339479c14 (diff) | |
parent | bb53c6169463a67cc751625cb0a2c47df129a2ab (diff) |
propagate from branch 'net.randombit.botan' (head 6581b789d58717bc6acee5c6a248e2d44c636e40)
to branch 'net.randombit.botan.c++0x' (head 227a989ae94da8f4379ea4b9b0fc0ee8dbdde0c7)
Diffstat (limited to 'src/constructs')
-rw-r--r-- | src/constructs/fpe/fpe.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/constructs/fpe/fpe.cpp b/src/constructs/fpe/fpe.cpp index d7101c544..3747171c2 100644 --- a/src/constructs/fpe/fpe.cpp +++ b/src/constructs/fpe/fpe.cpp @@ -105,10 +105,10 @@ FPE_Encryptor::FPE_Encryptor(const SymmetricKey& key, if(n_bin.size() > MAX_N_BYTES) throw std::runtime_error("N is too large for FPE encryption"); - mac->update_be(n_bin.size(), 4); + mac->update_be((u32bit)n_bin.size()); mac->update(&n_bin[0], n_bin.size()); - mac->update_be(tweak.size(), 4); + mac->update_be((u32bit)tweak.size()); mac->update(&tweak[0], tweak.size()); mac_n_t = mac->final(); @@ -119,9 +119,9 @@ BigInt FPE_Encryptor::operator()(u32bit round_no, const BigInt& R) SecureVector<byte> r_bin = BigInt::encode(R); mac->update(mac_n_t); - mac->update_be(round_no, 4); + mac->update_be(round_no); - mac->update_be(r_bin.size(), 4); + mac->update_be((u32bit)r_bin.size()); mac->update(&r_bin[0], r_bin.size()); SecureVector<byte> X = mac->final(); |