aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/modes/xts
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-03-11 12:05:06 +0000
committerlloyd <[email protected]>2015-03-11 12:05:06 +0000
commit1bf1490726d859596ac95c78c9a7763b8d420b2d (patch)
tree91b6126ca7f9491e997b340ea8ce0c8f96f8671a /src/lib/modes/xts
parent28e5dd404b5d4e3f5eec1a64a198c8f301636e23 (diff)
Add BOTAN_DLL back to LibraryInitializer and move some of the implementation to
a source file. Without BOTAN_DLL the LibraryInitializer was removed entirely from the list of symbols which is not desired. Add some casts to avoid scary sounding but (upon review) harmless warnings from MSVC
Diffstat (limited to 'src/lib/modes/xts')
-rw-r--r--src/lib/modes/xts/xts.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/modes/xts/xts.cpp b/src/lib/modes/xts/xts.cpp
index a4095580c..440d76ec2 100644
--- a/src/lib/modes/xts/xts.cpp
+++ b/src/lib/modes/xts/xts.cpp
@@ -19,7 +19,7 @@ void poly_double_128(byte out[], const byte in[])
u64bit X0 = load_le<u64bit>(in, 0);
u64bit X1 = load_le<u64bit>(in, 1);
- const bool carry = (X1 >> 63);
+ const bool carry = static_cast<bool>(X1 >> 63);
X1 = (X1 << 1) | (X0 >> 63);
X0 = (X0 << 1);
@@ -33,7 +33,7 @@ void poly_double_128(byte out[], const byte in[])
void poly_double_64(byte out[], const byte in[])
{
u64bit X = load_le<u64bit>(in, 0);
- const bool carry = (X >> 63);
+ const bool carry = static_cast<bool>(X >> 63);
X <<= 1;
if(carry)
X ^= 0x1B;