diff options
author | lloyd <[email protected]> | 2009-08-31 20:19:33 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-08-31 20:19:33 +0000 |
commit | 5b1b378f77ece0ed9dd726dc1083cbbd1ccbe937 (patch) | |
tree | 50d96a6cc63eb35334a2c2d32ccae1a2ad4dc0c6 /src/modes | |
parent | 8381ceca38f0eee44e893921cbd74fdb3014f7ba (diff) | |
parent | 53f3baadaaf6e2475f3e98943ea3e835579715df (diff) |
propagate from branch 'net.randombit.botan.1_8' (head c2624292793f396cf940403e0d12073a9b2c7b17)
to branch 'net.randombit.botan' (head 07a71effa1ba495b6ea57b2490ad38bf58a23bd0)
Diffstat (limited to 'src/modes')
-rw-r--r-- | src/modes/xts/xts.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modes/xts/xts.cpp b/src/modes/xts/xts.cpp index 8819c85dc..8780ae166 100644 --- a/src/modes/xts/xts.cpp +++ b/src/modes/xts/xts.cpp @@ -41,7 +41,6 @@ XTS_Encryption::XTS_Encryption(BlockCipher* ciph) : cipher(ciph) throw std::invalid_argument("Bad cipher for XTS: " + cipher->name()); cipher2 = cipher->clone(); - buffer.create(cipher->BLOCK_SIZE); tweak.create(cipher->BLOCK_SIZE); buffer.create(2 * cipher->BLOCK_SIZE); position = 0; @@ -58,7 +57,6 @@ XTS_Encryption::XTS_Encryption(BlockCipher* ciph, throw std::invalid_argument("Bad cipher for XTS: " + cipher->name()); cipher2 = cipher->clone(); - buffer.create(cipher->BLOCK_SIZE); tweak.create(cipher->BLOCK_SIZE); buffer.create(2 * cipher->BLOCK_SIZE); position = 0; @@ -188,6 +186,8 @@ void XTS_Encryption::end_msg() send(buffer, position); } + + position = 0; } /* @@ -197,7 +197,6 @@ XTS_Decryption::XTS_Decryption(BlockCipher* ciph) { cipher = ciph; cipher2 = ciph->clone(); - buffer.create(cipher->BLOCK_SIZE); tweak.create(cipher->BLOCK_SIZE); buffer.create(2 * cipher->BLOCK_SIZE); position = 0; @@ -212,7 +211,6 @@ XTS_Decryption::XTS_Decryption(BlockCipher* ciph, { cipher = ciph; cipher2 = ciph->clone(); - buffer.create(cipher->BLOCK_SIZE); tweak.create(cipher->BLOCK_SIZE); buffer.create(2 * cipher->BLOCK_SIZE); position = 0; @@ -339,6 +337,8 @@ void XTS_Decryption::end_msg() send(buffer, position); } + + position = 0; } } |