summaryrefslogtreecommitdiff
path: root/cast.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-01-24 18:24:53 -0500
committerJeffrey Walton <noloader@gmail.com>2018-01-24 18:24:53 -0500
commit4d4c3d92a8062d45203085f40a11a91aada490d4 (patch)
tree3290a1cd000663344c9ea5074a248a42155281a6 /cast.cpp
parent30bcc7022d036ccd2d690e17e19f277b4fa71250 (diff)
downloadcryptopp-git-4d4c3d92a8062d45203085f40a11a91aada490d4.tar.gz
Clear clang-tidy warnings
Diffstat (limited to 'cast.cpp')
-rw-r--r--cast.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/cast.cpp b/cast.cpp
index 352fcdf8..b0ad3127 100644
--- a/cast.cpp
+++ b/cast.cpp
@@ -35,7 +35,8 @@ typedef BlockGetAndPut<word32, BigEndian> Block;
void CAST128::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
{
- word32 t, l, r;
+ // TODO: add a SecBlock workspace to the class when the ABI can change
+ word32 t,l,r;
/* Get inblock into l,r */
Block::Get(inBlock)(l)(r);
@@ -65,7 +66,8 @@ void CAST128::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
void CAST128::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
{
- word32 t, l, r;
+ // TODO: add a SecBlock workspace to the class when the ABI can change
+ word32 t,l,r;
/* Get inblock into l,r */
Block::Get(inBlock)(r)(l);
@@ -90,8 +92,6 @@ void CAST128::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
F1(l, r, 0, 16);
/* Put l,r into outblock */
Block::Put(xorBlock, outBlock)(l)(r);
- /* Wipe clean */
- t = l = r = 0;
}
void CAST128::Base::UncheckedSetKey(const byte *userKey, unsigned int keylength, const NameValuePairs &)
@@ -213,6 +213,7 @@ the keys are used */
void CAST256::Base::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
{
+ // TODO: add a SecBlock workspace to the class when the ABI can change
word32 t, block[4];
Block::Get(inBlock)(block[0])(block[1])(block[2])(block[3]);
@@ -255,6 +256,7 @@ void CAST256::Base::UncheckedSetKey(const byte *userKey, unsigned int keylength,
{
AssertValidKeyLength(keylength);
+ // TODO: add a SecBlock workspace to the class when the ABI can change
word32 kappa[8];
GetUserKey(BIG_ENDIAN_ORDER, kappa, 8, userKey, keylength);