summaryrefslogtreecommitdiff
path: root/chachapoly.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-01-28 10:01:19 -0500
committerJeffrey Walton <noloader@gmail.com>2019-01-28 10:01:19 -0500
commit7c3414b0721dfafb7c71904dcbac2ee0fda359ef (patch)
tree64467f40e4878ca1975493a2900880d713363394 /chachapoly.h
parentfcf637082da86a1dd24c1b4ade9077e5bb8d598f (diff)
downloadcryptopp-git-7c3414b0721dfafb7c71904dcbac2ee0fda359ef.tar.gz
Fix ChaCha20Poly1305 IVSize() (GH #724)
Diffstat (limited to 'chachapoly.h')
-rw-r--r--chachapoly.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/chachapoly.h b/chachapoly.h
index 31dc9659..0c03e392 100644
--- a/chachapoly.h
+++ b/chachapoly.h
@@ -53,7 +53,7 @@ public:
IV_Requirement IVRequirement() const
{return UNIQUE_IV;}
unsigned int IVSize() const
- {return 16;}
+ {return 12;}
unsigned int MinIVLength() const
{return 12;}
unsigned int MaxIVLength() const
@@ -128,6 +128,10 @@ protected:
/// \since Crypto++ 8.1
class ChaCha20Poly1305_Final : public ChaCha20Poly1305_Base
{
+public:
+ static std::string StaticAlgorithmName()
+ {return std::string("ChaCha20/Poly1305");}
+
protected:
const SymmetricCipher & GetSymmetricCipher()
{return const_cast<ChaCha20Poly1305_Final *>(this)->AccessSymmetricCipher();}