diff options
Diffstat (limited to 'aesxx/include')
| -rw-r--r-- | aesxx/include/aesxx/box.hpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/aesxx/include/aesxx/box.hpp b/aesxx/include/aesxx/box.hpp index 72e3be2..5bd17de 100644 --- a/aesxx/include/aesxx/box.hpp +++ b/aesxx/include/aesxx/box.hpp @@ -20,7 +20,7 @@ namespace aes { class Box { public: - typedef AES_BoxBlock Block; + typedef AES_Block Block; typedef AES_BoxKey Key; static std::string format_key(const Key& src, Algorithm algorithm) { @@ -29,14 +29,14 @@ public: return reinterpret_cast<const char*>(&str); } - static std::string format_block(const Block& src, Algorithm algorithm) { - AES_BoxBlockString str; - aes_box_format_block(&str, algorithm, &src, ErrorDetailsThrowsInDestructor{}); + static std::string format_block(const Block& src) { + AES_BlockString str; + aes_AES_format_block(&str, &src, ErrorDetailsThrowsInDestructor{}); return reinterpret_cast<const char*>(&str); } - static void parse_block(Block& dest, Algorithm algorithm, std::string_view src) { - aes_box_parse_block(&dest, algorithm, src.data(), ErrorDetailsThrowsInDestructor{}); + static void parse_block(Block& dest, std::string_view src) { + aes_AES_parse_block(&dest, src.data(), ErrorDetailsThrowsInDestructor{}); } static void parse_key(Key& dest, Algorithm algorithm, std::string_view src) { @@ -106,18 +106,10 @@ public: return dest_buf; } - std::string format_block(const Block& src) { - return format_block(src, get_algorithm()); - } - std::string format_key(const Key& src) { return format_key(src, get_algorithm()); } - void parse_block(Block& dest, std::string_view src) { - parse_block(dest, get_algorithm(), src); - } - void parse_key(Key& dest, std::string_view src) { parse_key(dest, get_algorithm(), src); } |
