diff --git a/adler32.h b/adler32.h index 21891e7b..a50d126e 100644 --- a/adler32.h +++ b/adler32.h @@ -14,7 +14,7 @@ NAMESPACE_BEGIN(CryptoPP) class Adler32 : public HashTransformation { public: - CRYPTOPP_CONSTANT(DIGESTSIZE = 4) ; + CRYPTOPP_CONSTANT(DIGESTSIZE = 4); Adler32() {Reset();} void Update(const byte *input, size_t length); void TruncatedFinal(byte *hash, size_t size); diff --git a/aes.h b/aes.h index f2ea1b07..72ff2ccc 100644 --- a/aes.h +++ b/aes.h @@ -20,7 +20,7 @@ NAMESPACE_BEGIN(CryptoPP) /// \sa AES winner, announced on 10/2/2000 /// \since Rijndael since Crypto++ 3.1, Intel AES-NI since Crypto++ 5.6.1, ARMv8 AES since Crypto++ 6.0, /// Power8 AES since Crypto++ 6.0 -DOCUMENTED_TYPEDEF(Rijndael, AES) ; +DOCUMENTED_TYPEDEF(Rijndael, AES); typedef RijndaelEncryption AESEncryption; typedef RijndaelDecryption AESDecryption; diff --git a/arc4.h b/arc4.h index b0beddef..baed9e76 100644 --- a/arc4.h +++ b/arc4.h @@ -49,7 +49,7 @@ protected: /// \brief Alleged RC4 /// \sa Alleged RC4 /// \since Crypto++ 3.1 -DOCUMENTED_TYPEDEF(SymmetricCipherFinal, ARC4) ; +DOCUMENTED_TYPEDEF(SymmetricCipherFinal, ARC4); /// \brief MARC4 base class /// \details Implementations and overrides in \p Base apply to both \p ENCRYPTION and \p DECRYPTION directions @@ -70,7 +70,7 @@ protected: /// \brief Modified Alleged RC4 /// \sa Alleged RC4 /// \since Crypto++ 3.1 -DOCUMENTED_TYPEDEF(SymmetricCipherFinal, MARC4) ; +DOCUMENTED_TYPEDEF(SymmetricCipherFinal, MARC4); } #if CRYPTOPP_ENABLE_NAMESPACE_WEAK >= 1 diff --git a/blake2.h b/blake2.h index 79965fdd..d7981bbb 100644 --- a/blake2.h +++ b/blake2.h @@ -27,14 +27,14 @@ NAMESPACE_BEGIN(CryptoPP) struct BLAKE2s_Info : public VariableKeyLength<32,0,32,1,SimpleKeyingInterface::NOT_RESYNCHRONIZABLE> { typedef VariableKeyLength<32,0,32,1,SimpleKeyingInterface::NOT_RESYNCHRONIZABLE> KeyBase; - CRYPTOPP_CONSTANT(MIN_KEYLENGTH = KeyBase::MIN_KEYLENGTH) ; - CRYPTOPP_CONSTANT(MAX_KEYLENGTH = KeyBase::MAX_KEYLENGTH) ; - CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH = KeyBase::DEFAULT_KEYLENGTH) ; + CRYPTOPP_CONSTANT(MIN_KEYLENGTH = KeyBase::MIN_KEYLENGTH); + CRYPTOPP_CONSTANT(MAX_KEYLENGTH = KeyBase::MAX_KEYLENGTH); + CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH = KeyBase::DEFAULT_KEYLENGTH); - CRYPTOPP_CONSTANT(BLOCKSIZE = 64) ; - CRYPTOPP_CONSTANT(DIGESTSIZE = 32) ; - CRYPTOPP_CONSTANT(SALTSIZE = 8) ; - CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = 8) ; + CRYPTOPP_CONSTANT(BLOCKSIZE = 64); + CRYPTOPP_CONSTANT(DIGESTSIZE = 32); + CRYPTOPP_CONSTANT(SALTSIZE = 8); + CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = 8); CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "BLAKE2s";} }; @@ -44,14 +44,14 @@ struct BLAKE2s_Info : public VariableKeyLength<32,0,32,1,SimpleKeyingInterface:: struct BLAKE2b_Info : public VariableKeyLength<64,0,64,1,SimpleKeyingInterface::NOT_RESYNCHRONIZABLE> { typedef VariableKeyLength<64,0,64,1,SimpleKeyingInterface::NOT_RESYNCHRONIZABLE> KeyBase; - CRYPTOPP_CONSTANT(MIN_KEYLENGTH = KeyBase::MIN_KEYLENGTH) ; - CRYPTOPP_CONSTANT(MAX_KEYLENGTH = KeyBase::MAX_KEYLENGTH) ; - CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH = KeyBase::DEFAULT_KEYLENGTH) ; + CRYPTOPP_CONSTANT(MIN_KEYLENGTH = KeyBase::MIN_KEYLENGTH); + CRYPTOPP_CONSTANT(MAX_KEYLENGTH = KeyBase::MAX_KEYLENGTH); + CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH = KeyBase::DEFAULT_KEYLENGTH); - CRYPTOPP_CONSTANT(BLOCKSIZE = 128) ; - CRYPTOPP_CONSTANT(DIGESTSIZE = 64) ; - CRYPTOPP_CONSTANT(SALTSIZE = 16) ; - CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = 16) ; + CRYPTOPP_CONSTANT(BLOCKSIZE = 128); + CRYPTOPP_CONSTANT(DIGESTSIZE = 64); + CRYPTOPP_CONSTANT(SALTSIZE = 16); + CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = 16); CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "BLAKE2b";} }; @@ -59,9 +59,9 @@ struct BLAKE2b_Info : public VariableKeyLength<64,0,64,1,SimpleKeyingInterface:: /// \brief BLAKE2s parameter block struct CRYPTOPP_NO_VTABLE BLAKE2s_ParameterBlock { - CRYPTOPP_CONSTANT(SALTSIZE = BLAKE2s_Info::SALTSIZE) ; - CRYPTOPP_CONSTANT(DIGESTSIZE = BLAKE2s_Info::DIGESTSIZE) ; - CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = BLAKE2s_Info::PERSONALIZATIONSIZE) ; + CRYPTOPP_CONSTANT(SALTSIZE = BLAKE2s_Info::SALTSIZE); + CRYPTOPP_CONSTANT(DIGESTSIZE = BLAKE2s_Info::DIGESTSIZE); + CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = BLAKE2s_Info::PERSONALIZATIONSIZE); BLAKE2s_ParameterBlock() { @@ -110,9 +110,9 @@ struct CRYPTOPP_NO_VTABLE BLAKE2s_ParameterBlock /// \brief BLAKE2b parameter block struct CRYPTOPP_NO_VTABLE BLAKE2b_ParameterBlock { - CRYPTOPP_CONSTANT(SALTSIZE = BLAKE2b_Info::SALTSIZE) ; - CRYPTOPP_CONSTANT(DIGESTSIZE = BLAKE2b_Info::DIGESTSIZE) ; - CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = BLAKE2b_Info::PERSONALIZATIONSIZE) ; + CRYPTOPP_CONSTANT(SALTSIZE = BLAKE2b_Info::SALTSIZE); + CRYPTOPP_CONSTANT(DIGESTSIZE = BLAKE2b_Info::DIGESTSIZE); + CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = BLAKE2b_Info::PERSONALIZATIONSIZE); BLAKE2b_ParameterBlock() { @@ -185,7 +185,7 @@ struct CRYPTOPP_NO_VTABLE BLAKE2s_State } // SSE4, Power7 and NEON depend upon t[] and f[] being side-by-side - CRYPTOPP_CONSTANT(BLOCKSIZE = BLAKE2s_Info::BLOCKSIZE) ; + CRYPTOPP_CONSTANT(BLOCKSIZE = BLAKE2s_Info::BLOCKSIZE); FixedSizeAlignedSecBlock m_hft; FixedSizeAlignedSecBlock m_buf; size_t m_len; @@ -218,7 +218,7 @@ struct CRYPTOPP_NO_VTABLE BLAKE2b_State } // SSE4, Power8 and NEON depend upon t[] and f[] being side-by-side - CRYPTOPP_CONSTANT(BLOCKSIZE = BLAKE2b_Info::BLOCKSIZE) ; + CRYPTOPP_CONSTANT(BLOCKSIZE = BLAKE2b_Info::BLOCKSIZE); FixedSizeAlignedSecBlock m_hft; FixedSizeAlignedSecBlock m_buf; size_t m_len; @@ -237,14 +237,14 @@ struct CRYPTOPP_NO_VTABLE BLAKE2b_State class BLAKE2s : public SimpleKeyingInterfaceImpl { public: - CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH = BLAKE2s_Info::DEFAULT_KEYLENGTH) ; - CRYPTOPP_CONSTANT(MIN_KEYLENGTH = BLAKE2s_Info::MIN_KEYLENGTH) ; - CRYPTOPP_CONSTANT(MAX_KEYLENGTH = BLAKE2s_Info::MAX_KEYLENGTH) ; + CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH = BLAKE2s_Info::DEFAULT_KEYLENGTH); + CRYPTOPP_CONSTANT(MIN_KEYLENGTH = BLAKE2s_Info::MIN_KEYLENGTH); + CRYPTOPP_CONSTANT(MAX_KEYLENGTH = BLAKE2s_Info::MAX_KEYLENGTH); - CRYPTOPP_CONSTANT(DIGESTSIZE = BLAKE2s_Info::DIGESTSIZE) ; - CRYPTOPP_CONSTANT(BLOCKSIZE = BLAKE2s_Info::BLOCKSIZE) ; - CRYPTOPP_CONSTANT(SALTSIZE = BLAKE2s_Info::SALTSIZE) ; - CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = BLAKE2s_Info::PERSONALIZATIONSIZE) ; + CRYPTOPP_CONSTANT(DIGESTSIZE = BLAKE2s_Info::DIGESTSIZE); + CRYPTOPP_CONSTANT(BLOCKSIZE = BLAKE2s_Info::BLOCKSIZE); + CRYPTOPP_CONSTANT(SALTSIZE = BLAKE2s_Info::SALTSIZE); + CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = BLAKE2s_Info::PERSONALIZATIONSIZE); typedef BLAKE2s_State State; typedef BLAKE2s_ParameterBlock ParameterBlock; @@ -344,14 +344,14 @@ private: class BLAKE2b : public SimpleKeyingInterfaceImpl { public: - CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH = BLAKE2b_Info::DEFAULT_KEYLENGTH) ; - CRYPTOPP_CONSTANT(MIN_KEYLENGTH = BLAKE2b_Info::MIN_KEYLENGTH) ; - CRYPTOPP_CONSTANT(MAX_KEYLENGTH = BLAKE2b_Info::MAX_KEYLENGTH) ; + CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH = BLAKE2b_Info::DEFAULT_KEYLENGTH); + CRYPTOPP_CONSTANT(MIN_KEYLENGTH = BLAKE2b_Info::MIN_KEYLENGTH); + CRYPTOPP_CONSTANT(MAX_KEYLENGTH = BLAKE2b_Info::MAX_KEYLENGTH); - CRYPTOPP_CONSTANT(DIGESTSIZE = BLAKE2b_Info::DIGESTSIZE) ; - CRYPTOPP_CONSTANT(BLOCKSIZE = BLAKE2b_Info::BLOCKSIZE) ; - CRYPTOPP_CONSTANT(SALTSIZE = BLAKE2b_Info::SALTSIZE) ; - CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = BLAKE2b_Info::PERSONALIZATIONSIZE) ; + CRYPTOPP_CONSTANT(DIGESTSIZE = BLAKE2b_Info::DIGESTSIZE); + CRYPTOPP_CONSTANT(BLOCKSIZE = BLAKE2b_Info::BLOCKSIZE); + CRYPTOPP_CONSTANT(SALTSIZE = BLAKE2b_Info::SALTSIZE); + CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = BLAKE2b_Info::PERSONALIZATIONSIZE); typedef BLAKE2b_State State; typedef BLAKE2b_ParameterBlock ParameterBlock; diff --git a/cham.cpp b/cham.cpp index ace0f07a..620b7953 100644 --- a/cham.cpp +++ b/cham.cpp @@ -45,11 +45,11 @@ using CryptoPP::rotrConstant; template inline void CHAM_EncRound(T x[4], const T k[KW], unsigned int i) { - CRYPTOPP_CONSTANT(IDX0 = (RR+0) % 4) ; - CRYPTOPP_CONSTANT(IDX1 = (RR+1) % 4) ; - CRYPTOPP_CONSTANT(IDX3 = (RR+3+1) % 4) ; - CRYPTOPP_CONSTANT(R1 = (RR % 2 == 0) ? 1 : 8) ; - CRYPTOPP_CONSTANT(R2 = (RR % 2 == 0) ? 8 : 1) ; + CRYPTOPP_CONSTANT(IDX0 = (RR+0) % 4); + CRYPTOPP_CONSTANT(IDX1 = (RR+1) % 4); + CRYPTOPP_CONSTANT(IDX3 = (RR+3+1) % 4); + CRYPTOPP_CONSTANT(R1 = (RR % 2 == 0) ? 1 : 8); + CRYPTOPP_CONSTANT(R2 = (RR % 2 == 0) ? 8 : 1); // Follows conventions in the ref impl const T kk = k[i % KW]; @@ -79,11 +79,11 @@ inline void CHAM_EncRound(T x[4], const T k[KW], unsigned int i) template inline void CHAM_DecRound(T x[4], const T k[KW], unsigned int i) { - CRYPTOPP_CONSTANT(IDX0 = (RR+0) % 4) ; - CRYPTOPP_CONSTANT(IDX1 = (RR+1) % 4) ; - CRYPTOPP_CONSTANT(IDX3 = (RR+3+1) % 4) ; - CRYPTOPP_CONSTANT(R1 = (RR % 2 == 0) ? 8 : 1) ; - CRYPTOPP_CONSTANT(R2 = (RR % 2 == 0) ? 1 : 8) ; + CRYPTOPP_CONSTANT(IDX0 = (RR+0) % 4); + CRYPTOPP_CONSTANT(IDX1 = (RR+1) % 4); + CRYPTOPP_CONSTANT(IDX3 = (RR+3+1) % 4); + CRYPTOPP_CONSTANT(R1 = (RR % 2 == 0) ? 8 : 1); + CRYPTOPP_CONSTANT(R2 = (RR % 2 == 0) ? 1 : 8); // Follows conventions in the ref impl const T kk = k[i % KW]; diff --git a/cpu.cpp b/cpu.cpp index c51add69..74fc5734 100644 --- a/cpu.cpp +++ b/cpu.cpp @@ -328,8 +328,8 @@ void DetectX86Features() // AVX is similar to SSE, but check both bits 27 (SSE) and 28 (AVX). // https://software.intel.com/en-us/blogs/2011/04/14/is-avx-enabled - CRYPTOPP_CONSTANT(YMM_FLAG = (3 << 1)) ; - CRYPTOPP_CONSTANT(AVX_FLAG = (3 << 27)) ; + CRYPTOPP_CONSTANT(YMM_FLAG = (3 << 1)); + CRYPTOPP_CONSTANT(AVX_FLAG = (3 << 27)); if ((cpuid1[2] & AVX_FLAG) == AVX_FLAG) { @@ -389,11 +389,11 @@ void DetectX86Features() if (IsIntel(cpuid0)) { - CRYPTOPP_CONSTANT(RDRAND_FLAG = (1 << 30)) ; - CRYPTOPP_CONSTANT(RDSEED_FLAG = (1 << 18)) ; - CRYPTOPP_CONSTANT( ADX_FLAG = (1 << 19)) ; - CRYPTOPP_CONSTANT( SHA_FLAG = (1 << 29)) ; - CRYPTOPP_CONSTANT( AVX2_FLAG = (1 << 5)) ; + CRYPTOPP_CONSTANT(RDRAND_FLAG = (1 << 30)); + CRYPTOPP_CONSTANT(RDSEED_FLAG = (1 << 18)); + CRYPTOPP_CONSTANT( ADX_FLAG = (1 << 19)); + CRYPTOPP_CONSTANT( SHA_FLAG = (1 << 29)); + CRYPTOPP_CONSTANT( AVX2_FLAG = (1 << 5)); g_isP4 = ((cpuid1[0] >> 8) & 0xf) == 0xf; g_cacheLineSize = 8 * GETBYTE(cpuid1[1], 1); @@ -412,11 +412,11 @@ void DetectX86Features() } else if (IsAMD(cpuid0) || IsHygon(cpuid0)) { - CRYPTOPP_CONSTANT(RDRAND_FLAG = (1 << 30)) ; - CRYPTOPP_CONSTANT(RDSEED_FLAG = (1 << 18)) ; - CRYPTOPP_CONSTANT( ADX_FLAG = (1 << 19)) ; - CRYPTOPP_CONSTANT( SHA_FLAG = (1 << 29)) ; - CRYPTOPP_CONSTANT( AVX2_FLAG = (1 << 5)) ; + CRYPTOPP_CONSTANT(RDRAND_FLAG = (1 << 30)); + CRYPTOPP_CONSTANT(RDSEED_FLAG = (1 << 18)); + CRYPTOPP_CONSTANT( ADX_FLAG = (1 << 19)); + CRYPTOPP_CONSTANT( SHA_FLAG = (1 << 29)); + CRYPTOPP_CONSTANT( AVX2_FLAG = (1 << 5)); CpuId(0x80000005, 0, cpuid2); g_cacheLineSize = GETBYTE(cpuid2[2], 0); @@ -436,11 +436,11 @@ void DetectX86Features() else if (IsVIA(cpuid0)) { // Two bits: available and enabled - CRYPTOPP_CONSTANT( RNG_FLAGS = (0x3 << 2)) ; - CRYPTOPP_CONSTANT( ACE_FLAGS = (0x3 << 6)) ; - CRYPTOPP_CONSTANT(ACE2_FLAGS = (0x3 << 8)) ; - CRYPTOPP_CONSTANT( PHE_FLAGS = (0x3 << 10)) ; - CRYPTOPP_CONSTANT( PMM_FLAGS = (0x3 << 12)) ; + CRYPTOPP_CONSTANT( RNG_FLAGS = (0x3 << 2)); + CRYPTOPP_CONSTANT( ACE_FLAGS = (0x3 << 6)); + CRYPTOPP_CONSTANT(ACE2_FLAGS = (0x3 << 8)); + CRYPTOPP_CONSTANT( PHE_FLAGS = (0x3 << 10)); + CRYPTOPP_CONSTANT( PMM_FLAGS = (0x3 << 12)); CpuId(0xC0000000, 0, cpuid2); word32 extendedFeatures = cpuid2[0]; diff --git a/crc.h b/crc.h index 9f741aa3..cc0e05e8 100644 --- a/crc.h +++ b/crc.h @@ -25,7 +25,7 @@ const word32 CRC32_NEGL = 0xffffffffL; class CRC32 : public HashTransformation { public: - CRYPTOPP_CONSTANT(DIGESTSIZE = 4) ; + CRYPTOPP_CONSTANT(DIGESTSIZE = 4); CRC32(); void Update(const byte *input, size_t length); void TruncatedFinal(byte *hash, size_t size); @@ -52,7 +52,7 @@ private: class CRC32C : public HashTransformation { public: - CRYPTOPP_CONSTANT(DIGESTSIZE = 4) ; + CRYPTOPP_CONSTANT(DIGESTSIZE = 4); CRC32C(); void Update(const byte *input, size_t length); void TruncatedFinal(byte *hash, size_t size); diff --git a/default.h b/default.h index 5f4c3905..da9cfb8d 100644 --- a/default.h +++ b/default.h @@ -56,11 +56,11 @@ class MACBadErr : public DataDecryptorErr template struct DataParametersInfo { - CRYPTOPP_CONSTANT(BLOCKSIZE = BlockSize) ; - CRYPTOPP_CONSTANT(KEYLENGTH = KeyLength) ; - CRYPTOPP_CONSTANT(SALTLENGTH = SaltSize) ; - CRYPTOPP_CONSTANT(DIGESTSIZE = DigestSize) ; - CRYPTOPP_CONSTANT(ITERATIONS = Iterations) ; + CRYPTOPP_CONSTANT(BLOCKSIZE = BlockSize); + CRYPTOPP_CONSTANT(KEYLENGTH = KeyLength); + CRYPTOPP_CONSTANT(SALTLENGTH = SaltSize); + CRYPTOPP_CONSTANT(DIGESTSIZE = DigestSize); + CRYPTOPP_CONSTANT(ITERATIONS = Iterations); }; typedef DataParametersInfo LegacyParametersInfo; @@ -78,11 +78,11 @@ template class DataEncryptor : public ProxyFilter, public Info { public: - CRYPTOPP_CONSTANT(BLOCKSIZE = Info::BLOCKSIZE) ; - CRYPTOPP_CONSTANT(KEYLENGTH = Info::KEYLENGTH) ; - CRYPTOPP_CONSTANT(SALTLENGTH = Info::SALTLENGTH) ; - CRYPTOPP_CONSTANT(DIGESTSIZE = Info::DIGESTSIZE) ; - CRYPTOPP_CONSTANT(ITERATIONS = Info::ITERATIONS) ; + CRYPTOPP_CONSTANT(BLOCKSIZE = Info::BLOCKSIZE); + CRYPTOPP_CONSTANT(KEYLENGTH = Info::KEYLENGTH); + CRYPTOPP_CONSTANT(SALTLENGTH = Info::SALTLENGTH); + CRYPTOPP_CONSTANT(DIGESTSIZE = Info::DIGESTSIZE); + CRYPTOPP_CONSTANT(ITERATIONS = Info::ITERATIONS); /// \brief Construct a DataEncryptor /// \param passphrase a C-String password @@ -116,11 +116,11 @@ template class DataDecryptor : public ProxyFilter, public Info { public: - CRYPTOPP_CONSTANT(BLOCKSIZE = Info::BLOCKSIZE) ; - CRYPTOPP_CONSTANT(KEYLENGTH = Info::KEYLENGTH) ; - CRYPTOPP_CONSTANT(SALTLENGTH = Info::SALTLENGTH) ; - CRYPTOPP_CONSTANT(DIGESTSIZE = Info::DIGESTSIZE) ; - CRYPTOPP_CONSTANT(ITERATIONS = Info::ITERATIONS) ; + CRYPTOPP_CONSTANT(BLOCKSIZE = Info::BLOCKSIZE); + CRYPTOPP_CONSTANT(KEYLENGTH = Info::KEYLENGTH); + CRYPTOPP_CONSTANT(SALTLENGTH = Info::SALTLENGTH); + CRYPTOPP_CONSTANT(DIGESTSIZE = Info::DIGESTSIZE); + CRYPTOPP_CONSTANT(ITERATIONS = Info::ITERATIONS); /// \brief Constructs a DataDecryptor /// \param passphrase a C-String password @@ -173,11 +173,11 @@ template class DataEncryptorWithMAC : public ProxyFilter { public: - CRYPTOPP_CONSTANT(BLOCKSIZE = Info::BLOCKSIZE) ; - CRYPTOPP_CONSTANT(KEYLENGTH = Info::KEYLENGTH) ; - CRYPTOPP_CONSTANT(SALTLENGTH = Info::SALTLENGTH) ; - CRYPTOPP_CONSTANT(DIGESTSIZE = Info::DIGESTSIZE) ; - CRYPTOPP_CONSTANT(ITERATIONS = Info::ITERATIONS) ; + CRYPTOPP_CONSTANT(BLOCKSIZE = Info::BLOCKSIZE); + CRYPTOPP_CONSTANT(KEYLENGTH = Info::KEYLENGTH); + CRYPTOPP_CONSTANT(SALTLENGTH = Info::SALTLENGTH); + CRYPTOPP_CONSTANT(DIGESTSIZE = Info::DIGESTSIZE); + CRYPTOPP_CONSTANT(ITERATIONS = Info::ITERATIONS); /// \brief Constructs a DataEncryptorWithMAC /// \param passphrase a C-String password @@ -218,11 +218,11 @@ template class DataDecryptorWithMAC : public ProxyFilter { public: - CRYPTOPP_CONSTANT(BLOCKSIZE = Info::BLOCKSIZE) ; - CRYPTOPP_CONSTANT(KEYLENGTH = Info::KEYLENGTH) ; - CRYPTOPP_CONSTANT(SALTLENGTH = Info::SALTLENGTH) ; - CRYPTOPP_CONSTANT(DIGESTSIZE = Info::DIGESTSIZE) ; - CRYPTOPP_CONSTANT(ITERATIONS = Info::ITERATIONS) ; + CRYPTOPP_CONSTANT(BLOCKSIZE = Info::BLOCKSIZE); + CRYPTOPP_CONSTANT(KEYLENGTH = Info::KEYLENGTH); + CRYPTOPP_CONSTANT(SALTLENGTH = Info::SALTLENGTH); + CRYPTOPP_CONSTANT(DIGESTSIZE = Info::DIGESTSIZE); + CRYPTOPP_CONSTANT(ITERATIONS = Info::ITERATIONS); /// \brief Constructs a DataDecryptor /// \param passphrase a C-String password diff --git a/dmac.h b/dmac.h index b92472e5..9d911708 100644 --- a/dmac.h +++ b/dmac.h @@ -17,7 +17,7 @@ template class CRYPTOPP_NO_VTABLE DMAC_Base : public SameKeyLengthAs, public MessageAuthenticationCode { public: - CRYPTOPP_CONSTANT(DIGESTSIZE=T::BLOCKSIZE) ; + CRYPTOPP_CONSTANT(DIGESTSIZE=T::BLOCKSIZE); static std::string StaticAlgorithmName() {return std::string("DMAC(") + T::StaticAlgorithmName() + ")";} virtual~DMAC_Base() {} diff --git a/drbg.h b/drbg.h index 3a6e18e3..fe7bcf50 100644 --- a/drbg.h +++ b/drbg.h @@ -163,18 +163,18 @@ template . /// \sa ArraySink, ArrayXorSink /// \since Crypto++ 4.0 -DOCUMENTED_TYPEDEF(StringSinkTemplate, StringSink) ; +DOCUMENTED_TYPEDEF(StringSinkTemplate, StringSink); CRYPTOPP_DLL_TEMPLATE_CLASS StringSinkTemplate; /// \brief Append input to a std::vector object /// \details VectorSink is a typedef for StringSinkTemplate >. /// \since Crypto++ 8.0 -DOCUMENTED_TYPEDEF(StringSinkTemplate >, VectorSink) ; +DOCUMENTED_TYPEDEF(StringSinkTemplate >, VectorSink); CRYPTOPP_DLL_TEMPLATE_CLASS StringSinkTemplate >; /// \brief Incorporates input into RNG as additional entropy @@ -1425,7 +1425,7 @@ public: /// \details ArraySource is a typedef for StringSource. Use the third constructor for an array source. /// The third constructor takes a pointer and length. /// \since Crypto++ 5.6.0 -DOCUMENTED_TYPEDEF(StringSource, ArraySource) ; +DOCUMENTED_TYPEDEF(StringSource, ArraySource); /// \brief std::vector-based implementation of the Source interface /// \since Crypto++ 8.0 diff --git a/gf2n_simd.cpp b/gf2n_simd.cpp index 71d16ecb..c4f726f7 100644 --- a/gf2n_simd.cpp +++ b/gf2n_simd.cpp @@ -608,4 +608,4 @@ GF2NT_233_Square_Reduce_POWER8(const word* pA, word* pC) NAMESPACE_END -#endif // CRYPTOPP_IMPORTS \ No newline at end of file +#endif // CRYPTOPP_IMPORTS diff --git a/hmac.h b/hmac.h index 50276d36..00d30f23 100644 --- a/hmac.h +++ b/hmac.h @@ -52,8 +52,8 @@ template class HMAC : public MessageAuthenticationCodeImpl > { public: - CRYPTOPP_CONSTANT(DIGESTSIZE=T::DIGESTSIZE) ; - CRYPTOPP_CONSTANT(BLOCKSIZE=T::BLOCKSIZE) ; + CRYPTOPP_CONSTANT(DIGESTSIZE=T::DIGESTSIZE); + CRYPTOPP_CONSTANT(BLOCKSIZE=T::BLOCKSIZE); virtual ~HMAC() {} diff --git a/iterhash.h b/iterhash.h index cb2a6543..6b4054b2 100644 --- a/iterhash.h +++ b/iterhash.h @@ -126,7 +126,7 @@ public: typedef T_Endianness ByteOrderClass; typedef T_HashWordType HashWordType; - CRYPTOPP_CONSTANT(BLOCKSIZE = T_BlockSize) ; + CRYPTOPP_CONSTANT(BLOCKSIZE = T_BlockSize); // BCB2006 workaround: can't use BLOCKSIZE here CRYPTOPP_COMPILE_ASSERT((T_BlockSize & (T_BlockSize - 1)) == 0); // blockSize is a power of 2 @@ -178,7 +178,7 @@ class CRYPTOPP_NO_VTABLE IteratedHashWithStaticTransform : public ClonableImpl, T_Transform> > { public: - CRYPTOPP_CONSTANT(DIGESTSIZE = T_DigestSize ? T_DigestSize : T_StateSize) ; + CRYPTOPP_CONSTANT(DIGESTSIZE = T_DigestSize ? T_DigestSize : T_StateSize); virtual ~IteratedHashWithStaticTransform() {} diff --git a/keccak.h b/keccak.h index 05800969..61e0290d 100644 --- a/keccak.h +++ b/keccak.h @@ -30,7 +30,7 @@ NAMESPACE_BEGIN(CryptoPP) ///
  Keccack_192 : public Keccack
 ///   {
 ///     public:
-///       CRYPTOPP_CONSTANT(DIGESTSIZE = 24)
;
+///       CRYPTOPP_CONSTANT(DIGESTSIZE = 24);
 ///       Keccack_192() : Keccack(DIGESTSIZE) {}
 ///   };
 ///   
@@ -72,8 +72,8 @@ template class Keccak_Final : public Keccak { public: - CRYPTOPP_CONSTANT(DIGESTSIZE = T_DigestSize) ; - CRYPTOPP_CONSTANT(BLOCKSIZE = 200 - 2 * DIGESTSIZE) ; + CRYPTOPP_CONSTANT(DIGESTSIZE = T_DigestSize); + CRYPTOPP_CONSTANT(BLOCKSIZE = 200 - 2 * DIGESTSIZE); static std::string StaticAlgorithmName() { return "Keccak-" + IntToString(DIGESTSIZE * 8); } @@ -99,19 +99,19 @@ private: /// \brief Keccak-224 message digest /// \since Crypto++ 5.6.4 -DOCUMENTED_TYPEDEF(Keccak_Final<28>, Keccak_224); ; +DOCUMENTED_TYPEDEF(Keccak_Final<28>, Keccak_224);; /// \brief Keccak-256 message digest /// \since Crypto++ 5.6.4 -DOCUMENTED_TYPEDEF(Keccak_Final<32>, Keccak_256); ; +DOCUMENTED_TYPEDEF(Keccak_Final<32>, Keccak_256);; /// \brief Keccak-384 message digest /// \since Crypto++ 5.6.4 -DOCUMENTED_TYPEDEF(Keccak_Final<48>, Keccak_384); ; +DOCUMENTED_TYPEDEF(Keccak_Final<48>, Keccak_384);; /// \brief Keccak-512 message digest /// \since Crypto++ 5.6.4 -DOCUMENTED_TYPEDEF(Keccak_Final<64>, Keccak_512); ; +DOCUMENTED_TYPEDEF(Keccak_Final<64>, Keccak_512);; NAMESPACE_END diff --git a/lubyrack.h b/lubyrack.h index 8751f05d..a5d6a18d 100644 --- a/lubyrack.h +++ b/lubyrack.h @@ -37,7 +37,7 @@ class LR : public LR_Info, public BlockCipherDocumentation } protected: - CRYPTOPP_CONSTANT(S=T::DIGESTSIZE) ; + CRYPTOPP_CONSTANT(S=T::DIGESTSIZE); unsigned int L; // key length / 2 SecByteBlock key; diff --git a/md2.h b/md2.h index 5076be31..3b8d3ef3 100644 --- a/md2.h +++ b/md2.h @@ -27,8 +27,8 @@ public: unsigned int BlockSize() const {return BLOCKSIZE;} CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "MD2";} - CRYPTOPP_CONSTANT(DIGESTSIZE = 16) ; - CRYPTOPP_CONSTANT(BLOCKSIZE = 16) ; + CRYPTOPP_CONSTANT(DIGESTSIZE = 16); + CRYPTOPP_CONSTANT(BLOCKSIZE = 16); private: void Transform(); diff --git a/mersenne.h b/mersenne.h index 9bd97341..b49d4032 100644 --- a/mersenne.h +++ b/mersenne.h @@ -225,4 +225,3 @@ typedef MersenneTwister<0x9908B0DF /*2567483615*/, 397, 624, 0x6C078965 /*181243 NAMESPACE_END #endif // CRYPTOPP_MERSENNE_TWISTER_H - diff --git a/naclite.h b/naclite.h index f9d14d41..b9d4d670 100644 --- a/naclite.h +++ b/naclite.h @@ -64,85 +64,85 @@ NAMESPACE_BEGIN(NaCl) /// \brief Hash size in bytes /// \sa NaCl crypto_hash documentation -CRYPTOPP_CONSTANT(crypto_hash_BYTES = 64) ; +CRYPTOPP_CONSTANT(crypto_hash_BYTES = 64); /// \brief Key size in bytes /// \sa NaCl crypto_stream documentation -CRYPTOPP_CONSTANT(crypto_stream_KEYBYTES = 32) ; +CRYPTOPP_CONSTANT(crypto_stream_KEYBYTES = 32); /// \brief Nonce size in bytes /// \sa NaCl crypto_stream documentation -CRYPTOPP_CONSTANT(crypto_stream_NONCEBYTES = 24) ; +CRYPTOPP_CONSTANT(crypto_stream_NONCEBYTES = 24); /// \brief Key size in bytes /// \sa NaCl crypto_auth documentation -CRYPTOPP_CONSTANT(crypto_auth_KEYBYTES = 32) ; +CRYPTOPP_CONSTANT(crypto_auth_KEYBYTES = 32); /// \brief Tag size in bytes /// \sa NaCl crypto_auth documentation -CRYPTOPP_CONSTANT(crypto_auth_BYTES = 16) ; +CRYPTOPP_CONSTANT(crypto_auth_BYTES = 16); /// \brief Key size in bytes /// \sa NaCl crypto_onetimeauth documentation -CRYPTOPP_CONSTANT(crypto_onetimeauth_KEYBYTES = 32) ; +CRYPTOPP_CONSTANT(crypto_onetimeauth_KEYBYTES = 32); /// \brief Tag size in bytes /// \sa NaCl crypto_onetimeauth documentation -CRYPTOPP_CONSTANT(crypto_onetimeauth_BYTES = 16) ; +CRYPTOPP_CONSTANT(crypto_onetimeauth_BYTES = 16); /// \brief Key size in bytes /// \sa NaCl crypto_secretbox documentation -CRYPTOPP_CONSTANT(crypto_secretbox_KEYBYTES = 32) ; +CRYPTOPP_CONSTANT(crypto_secretbox_KEYBYTES = 32); /// \brief Nonce size in bytes /// \sa NaCl crypto_secretbox documentation -CRYPTOPP_CONSTANT(crypto_secretbox_NONCEBYTES = 24) ; +CRYPTOPP_CONSTANT(crypto_secretbox_NONCEBYTES = 24); /// \brief Zero-padded message prefix in bytes /// \sa NaCl crypto_secretbox documentation -CRYPTOPP_CONSTANT(crypto_secretbox_ZEROBYTES = 32) ; +CRYPTOPP_CONSTANT(crypto_secretbox_ZEROBYTES = 32); /// \brief Zero-padded message prefix in bytes /// \sa NaCl crypto_secretbox documentation -CRYPTOPP_CONSTANT(crypto_secretbox_BOXZEROBYTES = 16) ; +CRYPTOPP_CONSTANT(crypto_secretbox_BOXZEROBYTES = 16); /// \brief Private key size in bytes /// \sa NaCl crypto_box documentation -CRYPTOPP_CONSTANT(crypto_box_SECRETKEYBYTES = 32) ; +CRYPTOPP_CONSTANT(crypto_box_SECRETKEYBYTES = 32); /// \brief Public key size in bytes /// \sa NaCl crypto_box documentation -CRYPTOPP_CONSTANT(crypto_box_PUBLICKEYBYTES = 32) ; +CRYPTOPP_CONSTANT(crypto_box_PUBLICKEYBYTES = 32); /// \brief Nonce size in bytes /// \sa NaCl crypto_box documentation -CRYPTOPP_CONSTANT(crypto_box_NONCEBYTES = 24) ; +CRYPTOPP_CONSTANT(crypto_box_NONCEBYTES = 24); /// \brief Message 0-byte prefix in bytes /// \sa NaCl crypto_box documentation -CRYPTOPP_CONSTANT(crypto_box_ZEROBYTES = 32) ; +CRYPTOPP_CONSTANT(crypto_box_ZEROBYTES = 32); /// \brief Open box 0-byte prefix in bytes /// \sa NaCl crypto_box documentation -CRYPTOPP_CONSTANT(crypto_box_BOXZEROBYTES = 16) ; +CRYPTOPP_CONSTANT(crypto_box_BOXZEROBYTES = 16); /// \brief Precomputation 0-byte prefix in bytes in bytes /// \sa NaCl crypto_box documentation -CRYPTOPP_CONSTANT(crypto_box_BEFORENMBYTES = 32) ; +CRYPTOPP_CONSTANT(crypto_box_BEFORENMBYTES = 32); /// \brief MAC size in bytes /// \details crypto_box_MACBYTES was missing from tweetnacl.h. Its is defined as /// crypto_box_curve25519xsalsa20poly1305_MACBYTES, which is defined as 16U. /// \sa NaCl crypto_box documentation -CRYPTOPP_CONSTANT(crypto_box_MACBYTES = 16) ; +CRYPTOPP_CONSTANT(crypto_box_MACBYTES = 16); /// \brief Private key size in bytes /// \sa NaCl crypto_sign documentation -CRYPTOPP_CONSTANT(crypto_sign_SECRETKEYBYTES = 64) ; +CRYPTOPP_CONSTANT(crypto_sign_SECRETKEYBYTES = 64); /// \brief Public key size in bytes /// \sa NaCl crypto_sign documentation -CRYPTOPP_CONSTANT(crypto_sign_PUBLICKEYBYTES = 32) ; +CRYPTOPP_CONSTANT(crypto_sign_PUBLICKEYBYTES = 32); /// \brief Seed size in bytes /// \sa NaCl crypto_sign documentation -CRYPTOPP_CONSTANT(crypto_sign_SEEDBYTES = 32) ; +CRYPTOPP_CONSTANT(crypto_sign_SEEDBYTES = 32); /// \brief Signature size in bytes /// \sa NaCl crypto_sign documentation -CRYPTOPP_CONSTANT(crypto_sign_BYTES = 64) ; +CRYPTOPP_CONSTANT(crypto_sign_BYTES = 64); /// \brief Group element size in bytes /// \sa NaCl crypto_scalarmult documentation -CRYPTOPP_CONSTANT(crypto_scalarmult_BYTES = 32) ; +CRYPTOPP_CONSTANT(crypto_scalarmult_BYTES = 32); /// \brief Integer size in bytes /// \sa NaCl crypto_scalarmult documentation -CRYPTOPP_CONSTANT(crypto_scalarmult_SCALARBYTES = 32) ; +CRYPTOPP_CONSTANT(crypto_scalarmult_SCALARBYTES = 32); /// \brief Encrypt and authenticate a message /// \param c output byte buffer diff --git a/panama.h b/panama.h index 776e6958..b3d50a04 100644 --- a/panama.h +++ b/panama.h @@ -32,7 +32,7 @@ public: protected: typedef word32 Stage[8]; - CRYPTOPP_CONSTANT(STAGES = 32) ; + CRYPTOPP_CONSTANT(STAGES = 32); FixedSizeAlignedSecBlock m_state; }; @@ -44,7 +44,7 @@ template class PanamaHash : protected Panama, public AlgorithmImpl, PanamaHash > { public: - CRYPTOPP_CONSTANT(DIGESTSIZE = 32) ; + CRYPTOPP_CONSTANT(DIGESTSIZE = 32); virtual ~PanamaHash() {} PanamaHash() {Panama::Reset();} unsigned int DigestSize() const {return DIGESTSIZE;} diff --git a/poly1305.h b/poly1305.h index 90940415..0745d935 100644 --- a/poly1305.h +++ b/poly1305.h @@ -48,8 +48,8 @@ class CRYPTOPP_NO_VTABLE Poly1305_Base : public FixedKeyLength<32, SimpleKeyingI public: static std::string StaticAlgorithmName() {return std::string("Poly1305(") + T::StaticAlgorithmName() + ")";} - CRYPTOPP_CONSTANT(DIGESTSIZE=T::BLOCKSIZE) ; - CRYPTOPP_CONSTANT(BLOCKSIZE=T::BLOCKSIZE) ; + CRYPTOPP_CONSTANT(DIGESTSIZE=T::BLOCKSIZE); + CRYPTOPP_CONSTANT(BLOCKSIZE=T::BLOCKSIZE); virtual ~Poly1305_Base() {} Poly1305_Base() : m_idx(0), m_used(true) {} @@ -136,7 +136,7 @@ template class Poly1305 : public MessageAuthenticationCodeFinal > { public: - CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH=Poly1305_Base::DEFAULT_KEYLENGTH) ; + CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH=Poly1305_Base::DEFAULT_KEYLENGTH); /// \brief Construct a Poly1305 Poly1305() {} @@ -165,8 +165,8 @@ class Poly1305TLS_Base : public FixedKeyLength<32>, public MessageAuthentication { public: static std::string StaticAlgorithmName() {return std::string("Poly1305TLS");} - CRYPTOPP_CONSTANT(DIGESTSIZE=16) ; - CRYPTOPP_CONSTANT(BLOCKSIZE=16) ; + CRYPTOPP_CONSTANT(DIGESTSIZE=16); + CRYPTOPP_CONSTANT(BLOCKSIZE=16); virtual ~Poly1305TLS_Base() {} Poly1305TLS_Base() {} @@ -234,7 +234,7 @@ protected: /// \since Crypto++ 8.1 /// \sa MessageAuthenticationCode(), RFC /// 8439, ChaCha20 and Poly1305 for IETF Protocols -DOCUMENTED_TYPEDEF(MessageAuthenticationCodeFinal, Poly1305TLS) ; +DOCUMENTED_TYPEDEF(MessageAuthenticationCodeFinal, Poly1305TLS); NAMESPACE_END diff --git a/rc2.h b/rc2.h index ec0c03fa..50a39ae8 100644 --- a/rc2.h +++ b/rc2.h @@ -17,8 +17,8 @@ NAMESPACE_BEGIN(CryptoPP) /// \since Crypto++ 3.0 struct RC2_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 1, 128> { - CRYPTOPP_CONSTANT(DEFAULT_EFFECTIVE_KEYLENGTH = 1024) ; - CRYPTOPP_CONSTANT(MAX_EFFECTIVE_KEYLENGTH = 1024) ; + CRYPTOPP_CONSTANT(DEFAULT_EFFECTIVE_KEYLENGTH = 1024); + CRYPTOPP_CONSTANT(MAX_EFFECTIVE_KEYLENGTH = 1024); CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "RC2";} }; @@ -88,4 +88,3 @@ typedef RC2::Decryption RC2Decryption; NAMESPACE_END #endif - diff --git a/rsa.h b/rsa.h index d0918b96..62c1111e 100644 --- a/rsa.h +++ b/rsa.h @@ -203,17 +203,17 @@ struct RSASS_ISO : public TF_SS /// \brief \ref RSAES "RSAES::Decryptor" typedef /// \details RSA encryption scheme defined in PKCS #1 v2.0 -DOCUMENTED_TYPEDEF(RSAES::Decryptor, RSAES_PKCS1v15_Decryptor) ; +DOCUMENTED_TYPEDEF(RSAES::Decryptor, RSAES_PKCS1v15_Decryptor); /// \brief \ref RSAES "RSAES::Encryptor" typedef /// \details RSA encryption scheme defined in PKCS #1 v2.0 -DOCUMENTED_TYPEDEF(RSAES::Encryptor, RSAES_PKCS1v15_Encryptor) ; +DOCUMENTED_TYPEDEF(RSAES::Encryptor, RSAES_PKCS1v15_Encryptor); /// \brief \ref RSAES "RSAES>::Decryptor" typedef /// \details RSA encryption scheme defined in PKCS #1 v2.0 -DOCUMENTED_TYPEDEF(RSAES >::Decryptor, RSAES_OAEP_SHA_Decryptor) ; +DOCUMENTED_TYPEDEF(RSAES >::Decryptor, RSAES_OAEP_SHA_Decryptor); /// \brief \ref RSAES "RSAES>::Encryptor" typedef /// \details RSA encryption scheme defined in PKCS #1 v2.0 -DOCUMENTED_TYPEDEF(RSAES >::Encryptor, RSAES_OAEP_SHA_Encryptor) ; +DOCUMENTED_TYPEDEF(RSAES >::Encryptor, RSAES_OAEP_SHA_Encryptor); #ifdef CRYPTOPP_DOXYGEN_PROCESSING /// \brief \ref RSASS "RSASS::Signer" typedef diff --git a/seckey.h b/seckey.h index fe6f04d3..5367e254 100644 --- a/seckey.h +++ b/seckey.h @@ -41,7 +41,7 @@ class FixedBlockSize { public: /// \brief The block size of the algorithm provided as a constant. - CRYPTOPP_CONSTANT(BLOCKSIZE = N) ; + CRYPTOPP_CONSTANT(BLOCKSIZE = N); }; // ************** rounds *************** @@ -53,7 +53,7 @@ class FixedRounds { public: /// \brief The number of rounds for the algorithm provided as a constant. - CRYPTOPP_CONSTANT(ROUNDS = R) ; + CRYPTOPP_CONSTANT(ROUNDS = R); }; /// \brief Inherited by algorithms with variable number of rounds @@ -65,11 +65,11 @@ class VariableRounds { public: /// \brief The default number of rounds for the algorithm provided as a constant. - CRYPTOPP_CONSTANT(DEFAULT_ROUNDS = D) ; + CRYPTOPP_CONSTANT(DEFAULT_ROUNDS = D); /// \brief The minimum number of rounds for the algorithm provided as a constant. - CRYPTOPP_CONSTANT(MIN_ROUNDS = N) ; + CRYPTOPP_CONSTANT(MIN_ROUNDS = N); /// \brief The maximum number of rounds for the algorithm provided as a constant. - CRYPTOPP_CONSTANT(MAX_ROUNDS = M) ; + CRYPTOPP_CONSTANT(MAX_ROUNDS = M); /// \brief The default number of rounds for the algorithm based on key length /// provided by a static function. /// \param keylength the size of the key, in bytes @@ -126,23 +126,23 @@ class FixedKeyLength public: /// \brief The default key length used by the algorithm provided as a constant /// \details KEYLENGTH is provided in bytes, not bits - CRYPTOPP_CONSTANT(KEYLENGTH=N) ; + CRYPTOPP_CONSTANT(KEYLENGTH=N); /// \brief The minimum key length used by the algorithm provided as a constant /// \details MIN_KEYLENGTH is provided in bytes, not bits - CRYPTOPP_CONSTANT(MIN_KEYLENGTH=N) ; + CRYPTOPP_CONSTANT(MIN_KEYLENGTH=N); /// \brief The maximum key length used by the algorithm provided as a constant /// \details MAX_KEYLENGTH is provided in bytes, not bits - CRYPTOPP_CONSTANT(MAX_KEYLENGTH=N) ; + CRYPTOPP_CONSTANT(MAX_KEYLENGTH=N); /// \brief The default key length used by the algorithm provided as a constant /// \details DEFAULT_KEYLENGTH is provided in bytes, not bits - CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH=N) ; + CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH=N); /// \brief The default IV requirements for the algorithm provided as a constant /// \details The default value is NOT_RESYNCHRONIZABLE. See IV_Requirement /// in cryptlib.h for allowed values. - CRYPTOPP_CONSTANT(IV_REQUIREMENT = IV_REQ) ; + CRYPTOPP_CONSTANT(IV_REQUIREMENT = IV_REQ); /// \brief The default IV length used by the algorithm provided as a constant /// \details IV_LENGTH is provided in bytes, not bits. The default implementation uses 0. - CRYPTOPP_CONSTANT(IV_LENGTH = IV_L) ; + CRYPTOPP_CONSTANT(IV_LENGTH = IV_L); /// \brief The default key length for the algorithm provided by a static function. /// \param keylength the size of the key, in bytes /// \details The default implementation returns KEYLENGTH. keylength is unused @@ -175,23 +175,23 @@ class VariableKeyLength public: /// \brief The minimum key length used by the algorithm provided as a constant /// \details MIN_KEYLENGTH is provided in bytes, not bits - CRYPTOPP_CONSTANT(MIN_KEYLENGTH=N) ; + CRYPTOPP_CONSTANT(MIN_KEYLENGTH=N); /// \brief The maximum key length used by the algorithm provided as a constant /// \details MAX_KEYLENGTH is provided in bytes, not bits - CRYPTOPP_CONSTANT(MAX_KEYLENGTH=M) ; + CRYPTOPP_CONSTANT(MAX_KEYLENGTH=M); /// \brief The default key length used by the algorithm provided as a constant /// \details DEFAULT_KEYLENGTH is provided in bytes, not bits - CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH=D) ; + CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH=D); /// \brief The key length multiple used by the algorithm provided as a constant /// \details MAX_KEYLENGTH is provided in bytes, not bits - CRYPTOPP_CONSTANT(KEYLENGTH_MULTIPLE=Q) ; + CRYPTOPP_CONSTANT(KEYLENGTH_MULTIPLE=Q); /// \brief The default IV requirements for the algorithm provided as a constant /// \details The default value is NOT_RESYNCHRONIZABLE. See IV_Requirement /// in cryptlib.h for allowed values. - CRYPTOPP_CONSTANT(IV_REQUIREMENT=IV_REQ) ; + CRYPTOPP_CONSTANT(IV_REQUIREMENT=IV_REQ); /// \brief The default initialization vector length for the algorithm provided as a constant /// \details IV_LENGTH is provided in bytes, not bits. The default implementation uses 0. - CRYPTOPP_CONSTANT(IV_LENGTH=IV_L) ; + CRYPTOPP_CONSTANT(IV_LENGTH=IV_L); /// \brief Provides a valid key length for the algorithm provided by a static function. /// \param keylength the size of the key, in bytes /// \details If keylength is less than MIN_KEYLENGTH, then the function returns @@ -219,20 +219,20 @@ class SameKeyLengthAs public: /// \brief The minimum key length used by the algorithm provided as a constant /// \details MIN_KEYLENGTH is provided in bytes, not bits - CRYPTOPP_CONSTANT(MIN_KEYLENGTH=T::MIN_KEYLENGTH) ; + CRYPTOPP_CONSTANT(MIN_KEYLENGTH=T::MIN_KEYLENGTH); /// \brief The maximum key length used by the algorithm provided as a constant /// \details MIN_KEYLENGTH is provided in bytes, not bits - CRYPTOPP_CONSTANT(MAX_KEYLENGTH=T::MAX_KEYLENGTH) ; + CRYPTOPP_CONSTANT(MAX_KEYLENGTH=T::MAX_KEYLENGTH); /// \brief The default key length used by the algorithm provided as a constant /// \details MIN_KEYLENGTH is provided in bytes, not bits - CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH=T::DEFAULT_KEYLENGTH) ; + CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH=T::DEFAULT_KEYLENGTH); /// \brief The default IV requirements for the algorithm provided as a constant /// \details The default value is NOT_RESYNCHRONIZABLE. See IV_Requirement /// in cryptlib.h for allowed values. - CRYPTOPP_CONSTANT(IV_REQUIREMENT=IV_REQ) ; + CRYPTOPP_CONSTANT(IV_REQUIREMENT=IV_REQ); /// \brief The default initialization vector length for the algorithm provided as a constant /// \details IV_LENGTH is provided in bytes, not bits. The default implementation uses 0. - CRYPTOPP_CONSTANT(IV_LENGTH=IV_L) ; + CRYPTOPP_CONSTANT(IV_LENGTH=IV_L); /// \brief Provides a valid key length for the algorithm provided by a static function. /// \param keylength the size of the key, in bytes /// \details If keylength is less than MIN_KEYLENGTH, then the function returns diff --git a/sha3.h b/sha3.h index 05b296fe..f02b7d44 100644 --- a/sha3.h +++ b/sha3.h @@ -60,8 +60,8 @@ template class SHA3_Final : public SHA3 { public: - CRYPTOPP_CONSTANT(DIGESTSIZE = T_DigestSize) ; - CRYPTOPP_CONSTANT(BLOCKSIZE = 200 - 2 * DIGESTSIZE) ; + CRYPTOPP_CONSTANT(DIGESTSIZE = T_DigestSize); + CRYPTOPP_CONSTANT(BLOCKSIZE = 200 - 2 * DIGESTSIZE); static std::string StaticAlgorithmName() { return "SHA3-" + IntToString(DIGESTSIZE * 8); } diff --git a/shake.h b/shake.h index 698215b2..0eaab43b 100644 --- a/shake.h +++ b/shake.h @@ -66,8 +66,8 @@ template class SHAKE_Final : public SHAKE { public: - CRYPTOPP_CONSTANT(DIGESTSIZE = (T_Strength == 128 ? 32 : 64)) ; - CRYPTOPP_CONSTANT(BLOCKSIZE = (T_Strength == 128 ? 1344/8 : 1088/8)) ; + CRYPTOPP_CONSTANT(DIGESTSIZE = (T_Strength == 128 ? 32 : 64)); + CRYPTOPP_CONSTANT(BLOCKSIZE = (T_Strength == 128 ? 1344/8 : 1088/8)); static std::string StaticAlgorithmName() { return "SHAKE-" + IntToString(T_Strength); } diff --git a/siphash.h b/siphash.h index 938bbe3a..76dcccf6 100644 --- a/siphash.h +++ b/siphash.h @@ -39,7 +39,7 @@ class SipHash_Info : public FixedKeyLength<16> { public: CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "SipHash";} - CRYPTOPP_CONSTANT(DIGESTSIZE = (T_128bit ? 16 : 8)) ; + CRYPTOPP_CONSTANT(DIGESTSIZE = (T_128bit ? 16 : 8)); }; /// \brief SipHash message authentication code base class diff --git a/strciphr.h b/strciphr.h index 2b096a6f..3e88012d 100644 --- a/strciphr.h +++ b/strciphr.h @@ -208,7 +208,7 @@ struct CRYPTOPP_NO_VTABLE AdditiveCipherConcretePolicy : public BASE /// For example, ChaCha uses 16 each word32, and the value of /// BYTES_PER_ITERATION is 64. Each invocation of the ChaCha block function /// produces 64 bytes of keystream. - CRYPTOPP_CONSTANT(BYTES_PER_ITERATION = sizeof(WordType) * W) ; + CRYPTOPP_CONSTANT(BYTES_PER_ITERATION = sizeof(WordType) * W); virtual ~AdditiveCipherConcretePolicy() {} diff --git a/ttmac.h b/ttmac.h index 89b99395..d50b0038 100644 --- a/ttmac.h +++ b/ttmac.h @@ -17,7 +17,7 @@ class CRYPTOPP_NO_VTABLE TTMAC_Base : public FixedKeyLength<20>, public Iterated { public: static std::string StaticAlgorithmName() {return std::string("Two-Track-MAC");} - CRYPTOPP_CONSTANT(DIGESTSIZE=20) ; + CRYPTOPP_CONSTANT(DIGESTSIZE=20); unsigned int DigestSize() const {return DIGESTSIZE;}; void UncheckedSetKey(const byte *userKey, unsigned int keylength, const NameValuePairs ¶ms); @@ -37,7 +37,7 @@ protected: /// \tparam T HashTransformation class /// \details 160-bit MAC with 160-bit key /// \sa MessageAuthenticationCode(), Two-Track-MAC -DOCUMENTED_TYPEDEF(MessageAuthenticationCodeFinal, TTMAC) ; +DOCUMENTED_TYPEDEF(MessageAuthenticationCodeFinal, TTMAC); NAMESPACE_END diff --git a/xed25519.h b/xed25519.h index e11eace4..b4f96497 100644 --- a/xed25519.h +++ b/xed25519.h @@ -56,13 +56,13 @@ class x25519 : public SimpleKeyAgreementDomain, public CryptoParameters, public public: /// \brief Size of the private key /// \details SECRET_KEYLENGTH is the size of the private key, in bytes. - CRYPTOPP_CONSTANT(SECRET_KEYLENGTH = 32) ; + CRYPTOPP_CONSTANT(SECRET_KEYLENGTH = 32); /// \brief Size of the public key /// \details PUBLIC_KEYLENGTH is the size of the public key, in bytes. - CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32) ; + CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32); /// \brief Size of the shared key /// \details SHARED_KEYLENGTH is the size of the shared key, in bytes. - CRYPTOPP_CONSTANT(SHARED_KEYLENGTH = 32) ; + CRYPTOPP_CONSTANT(SHARED_KEYLENGTH = 32); virtual ~x25519() {} @@ -277,8 +277,8 @@ protected: /// message digest supplied by an attacker. struct ed25519_MessageAccumulator : public PK_MessageAccumulator { - CRYPTOPP_CONSTANT(RESERVE_SIZE=2048+64) ; - CRYPTOPP_CONSTANT(SIGNATURE_LENGTH=64) ; + CRYPTOPP_CONSTANT(RESERVE_SIZE=2048+64); + CRYPTOPP_CONSTANT(SIGNATURE_LENGTH=64); /// \brief Create a message accumulator ed25519_MessageAccumulator() { @@ -356,15 +356,15 @@ struct ed25519PrivateKey : public PKCS8PrivateKey { /// \brief Size of the private key /// \details SECRET_KEYLENGTH is the size of the private key, in bytes. - CRYPTOPP_CONSTANT(SECRET_KEYLENGTH = 32) ; + CRYPTOPP_CONSTANT(SECRET_KEYLENGTH = 32); /// \brief Size of the public key /// \details PUBLIC_KEYLENGTH is the size of the public key, in bytes. - CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32) ; + CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32); /// \brief Size of the siganture /// \details SIGNATURE_LENGTH is the size of the signature, in bytes. /// ed25519 is a DL-based signature scheme. The signature is the /// concatenation of r || s. - CRYPTOPP_CONSTANT(SIGNATURE_LENGTH = 64) ; + CRYPTOPP_CONSTANT(SIGNATURE_LENGTH = 64); // CryptoMaterial bool Validate(RandomNumberGenerator &rng, unsigned int level) const; @@ -497,15 +497,15 @@ struct ed25519Signer : public PK_Signer { /// \brief Size of the private key /// \details SECRET_KEYLENGTH is the size of the private key, in bytes. - CRYPTOPP_CONSTANT(SECRET_KEYLENGTH = 32) ; + CRYPTOPP_CONSTANT(SECRET_KEYLENGTH = 32); /// \brief Size of the public key /// \details PUBLIC_KEYLENGTH is the size of the public key, in bytes. - CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32) ; + CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32); /// \brief Size of the siganture /// \details SIGNATURE_LENGTH is the size of the signature, in bytes. /// ed25519 is a DL-based signature scheme. The signature is the /// concatenation of r || s. - CRYPTOPP_CONSTANT(SIGNATURE_LENGTH = 64) ; + CRYPTOPP_CONSTANT(SIGNATURE_LENGTH = 64); typedef Integer Element; virtual ~ed25519Signer() {} @@ -626,7 +626,7 @@ struct ed25519PublicKey : public X509PublicKey { /// \brief Size of the public key /// \details PUBLIC_KEYLENGTH is the size of the public key, in bytes. - CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32) ; + CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32); typedef Integer Element; OID GetAlgorithmID() const { @@ -700,8 +700,8 @@ protected: /// \since Crypto++ 8.0 struct ed25519Verifier : public PK_Verifier { - CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32) ; - CRYPTOPP_CONSTANT(SIGNATURE_LENGTH = 64) ; + CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32); + CRYPTOPP_CONSTANT(SIGNATURE_LENGTH = 64); typedef Integer Element; virtual ~ed25519Verifier() {}