diff options
author | Jeffrey Walton <[email protected]> | 2017-04-17 22:48:45 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-08-23 10:39:21 -0400 |
commit | cf031d7a8b9640b2223a64fb8477285aa7e6ef78 (patch) | |
tree | d57b2d87c75fed372892668948fd6e413c71bcfb /src/lib/block/block_cipher.cpp | |
parent | 767b4018ab2b5a651ec1db105778e29317366d97 (diff) |
Add ARIA Block Cipher (GH #1004)
Diffstat (limited to 'src/lib/block/block_cipher.cpp')
-rw-r--r-- | src/lib/block/block_cipher.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/lib/block/block_cipher.cpp b/src/lib/block/block_cipher.cpp index a0eafbd11..a3e17be4c 100644 --- a/src/lib/block/block_cipher.cpp +++ b/src/lib/block/block_cipher.cpp @@ -12,6 +12,10 @@ #include <botan/aes.h> #endif +#if defined(BOTAN_HAS_ARIA) + #include <botan/aria.h> +#endif + #if defined(BOTAN_HAS_BLOWFISH) #include <botan/blowfish.h> #endif @@ -132,6 +136,23 @@ BlockCipher::create(const std::string& algo, } #endif +#if defined(BOTAN_HAS_ARIA) + if(algo == "ARIA-128") + { + return std::unique_ptr<BlockCipher>(new ARIA_128); + } + + if(algo == "ARIA-192") + { + return std::unique_ptr<BlockCipher>(new ARIA_192); + } + + if(algo == "ARIA-256") + { + return std::unique_ptr<BlockCipher>(new ARIA_256); + } +#endif + #if defined(BOTAN_HAS_SERPENT) if(algo == "Serpent") { |