summaryrefslogtreecommitdiff
path: root/xts.h
diff options
context:
space:
mode:
Diffstat (limited to 'xts.h')
-rw-r--r--xts.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/xts.h b/xts.h
index 76c7b9ce..6559dcc7 100644
--- a/xts.h
+++ b/xts.h
@@ -61,9 +61,10 @@ public:
size_t DefaultKeyLength() const
{return GetBlockCipher().DefaultKeyLength()*2;}
size_t GetValidKeyLength(size_t n) const
- {return GetBlockCipher().GetValidKeyLength((n+1)/2);}
+ {return 2*GetBlockCipher().GetValidKeyLength((n+1)/2);}
bool IsValidKeyLength(size_t keylength) const
{return keylength == GetValidKeyLength(keylength);}
+ void ThrowIfInvalidKeyLength(size_t length);
/// Provides the block size of the cipher
/// \return the block size of the cipher, in bytes
@@ -111,8 +112,8 @@ template <class CIPHER>
class CRYPTOPP_NO_VTABLE XTS_Final : public XTS_ModeBase
{
public:
- static std::string CRYPTOPP_API StaticAlgorithmName()
- {return std::string(CIPHER::StaticAlgorithmName()) + "/XTS";}
+ static const char* CRYPTOPP_API StaticAlgorithmName()
+ {return "XTS";}
protected:
BlockCipher& AccessBlockCipher()