diff options
author | Jack Lloyd <[email protected]> | 2017-12-18 09:02:47 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-12-18 09:02:47 -0500 |
commit | 2b50c7b87374c0e3a747bd754f15921b80d6563a (patch) | |
tree | a6a89131cc9ffbf060ed1076c7b2fae1f9375012 /src/lib/stream/stream_cipher.cpp | |
parent | a738ad098d35fac318a97c5d5c5c0cc329c5c043 (diff) |
Accept ChaCha20 as a name
Diffstat (limited to 'src/lib/stream/stream_cipher.cpp')
-rw-r--r-- | src/lib/stream/stream_cipher.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/stream/stream_cipher.cpp b/src/lib/stream/stream_cipher.cpp index c0e75c0a8..77e68d129 100644 --- a/src/lib/stream/stream_cipher.cpp +++ b/src/lib/stream/stream_cipher.cpp @@ -64,6 +64,12 @@ std::unique_ptr<StreamCipher> StreamCipher::create(const std::string& algo_spec, if(provider.empty() || provider == "base") return std::unique_ptr<StreamCipher>(new ChaCha(req.arg_as_integer(0, 20))); } + + if(req.algo_name() == "ChaCha20") + { + if(provider.empty() || provider == "base") + return std::unique_ptr<StreamCipher>(new ChaCha(20)); + } #endif #if defined(BOTAN_HAS_SALSA20) |