summaryrefslogtreecommitdiff
path: root/chacha.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-10-26 03:13:06 -0400
committerJeffrey Walton <noloader@gmail.com>2018-10-26 03:13:06 -0400
commit8da2b91cbaf01640e6330e5dc6e858007da70945 (patch)
tree3e6b9bff02ac975c02e6bf820b88ea9d2713c0fa /chacha.h
parent76ab8ffa4b86710766dd1ba861deeccc261ffdcf (diff)
downloadcryptopp-git-8da2b91cbaf01640e6330e5dc6e858007da70945.tar.gz
Add ChaCha AlgorithmName override
Diffstat (limited to 'chacha.h')
-rw-r--r--chacha.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/chacha.h b/chacha.h
index e7ec2cb2..50d33d09 100644
--- a/chacha.h
+++ b/chacha.h
@@ -22,6 +22,13 @@ NAMESPACE_BEGIN(CryptoPP)
/// \since Crypto++ 5.6.4
struct ChaCha_Info : public VariableKeyLength<32, 16, 32, 16, SimpleKeyingInterface::UNIQUE_IV, 8>
{
+ /// \brief The algorithm name
+ /// \returns the algorithm name
+ /// \details StaticAlgorithmName returns the algorithm's name as a static
+ /// member function.
+ /// \details Bernstein named the cipher variants ChaCha8, ChaCha12 and
+ /// ChaCha20. More generally, Bernstein called the family ChaCha{r}.
+ /// AlgorithmName() provides the exact name once rounds are set.
static const char* StaticAlgorithmName() {
return "ChaCha";
}
@@ -40,6 +47,7 @@ protected:
unsigned int GetAlignment() const;
unsigned int GetOptimalBlockSize() const;
+ std::string AlgorithmName() const;
std::string AlgorithmProvider() const;
FixedSizeAlignedSecBlock<word32, 16> m_state;