diff --git a/chacha.h b/chacha.h index 28b8c7af..f62606b7 100644 --- a/chacha.h +++ b/chacha.h @@ -19,7 +19,9 @@ NAMESPACE_BEGIN(CryptoPP) template struct ChaCha_Info : public VariableKeyLength<32, 16, 32, 16, SimpleKeyingInterface::UNIQUE_IV, 8>, public FixedRounds { - static const char *StaticAlgorithmName() {static const std::string name = "ChaCha" + IntToString(R); return name.c_str();} + CRYPTOPP_CONSTEXPR static const char *StaticAlgorithmName() { + return (R==8?"ChaCha8":(R==12?"ChaCha12":(R==20?"ChaCha20":"ChaCha"))); + } }; //! \class ChaCha_Policy