Remove unused base64 component
Base 64 is no longer used in the auth module, so this is dead code
Change-Id: Ieafe522249fd8dfe0058ba63798ff5263b4b9027
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b31e085..d876375 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -94,7 +94,6 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
set(SRC_FILES
- src/base64.cpp
${GENERATED_SRC_FILES}
)
@@ -107,7 +106,6 @@
set(UT_FILES
src/crow_test.cpp
src/gtest_main.cpp
- src/base64_test.cpp
src/token_authorization_middleware_test.cpp
src/security_headers_middleware_test.cpp
src/webassets_test.cpp
diff --git a/include/base64.hpp b/include/base64.hpp
deleted file mode 100644
index 092189d..0000000
--- a/include/base64.hpp
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <string>
-
-namespace base64 {
-
-bool base64_encode(const std::string &input, std::string &output);
-bool base64_decode(const std::string &input, std::string &output);
-} // namespace base64
\ No newline at end of file
diff --git a/src/base64_test.cpp b/src/base64_test.cpp
deleted file mode 100644
index e21655e..0000000
--- a/src/base64_test.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-#include "base64.hpp"
-#include "big_list_of_naughty_strings.hpp"
-#include "gtest/gtest.h"
-
-// Tests that Base64 basic strings work
-TEST(Base64, EncodeBasicString) {
- std::string output;
- EXPECT_TRUE(base64::base64_encode("Foo", output));
-}
-
-// Tests the test vectors available in the base64 spec
-TEST(Base64, EncodeRFC4648) {
- std::string output;
- EXPECT_TRUE(base64::base64_encode("", output));
- EXPECT_EQ(output, "");
- EXPECT_TRUE(base64::base64_encode("f", output));
- EXPECT_EQ(output, "Zg==");
- EXPECT_TRUE(base64::base64_encode("fo", output));
- EXPECT_EQ(output, "Zm8=");
- EXPECT_TRUE(base64::base64_encode("foo", output));
- EXPECT_EQ(output, "Zm9v");
- EXPECT_TRUE(base64::base64_encode("foob", output));
- EXPECT_EQ(output, "Zm9vYg==");
- EXPECT_TRUE(base64::base64_encode("fooba", output));
- EXPECT_EQ(output, "Zm9vYmE=");
- EXPECT_TRUE(base64::base64_encode("foobar", output));
- EXPECT_EQ(output, "Zm9vYmFy");
-}
-
-// Tests the test vectors available in the base64 spec
-TEST(Base64, DecodeRFC4648) {
- std::string output;
- EXPECT_TRUE(base64::base64_decode("", output));
- EXPECT_EQ(output, "");
- EXPECT_TRUE(base64::base64_decode("Zg==", output));
- EXPECT_EQ(output, "f");
- EXPECT_TRUE(base64::base64_decode("Zm8=", output));
- EXPECT_EQ(output, "fo");
- EXPECT_TRUE(base64::base64_decode("Zm9v", output));
- EXPECT_EQ(output, "foo");
- EXPECT_TRUE(base64::base64_decode("Zm9vYg==", output));
- EXPECT_EQ(output, "foob");
- EXPECT_TRUE(base64::base64_decode("Zm9vYmE=", output));
- EXPECT_EQ(output, "fooba");
- EXPECT_TRUE(base64::base64_decode("Zm9vYmFy", output));
- EXPECT_EQ(output, "foobar");
-}
-
-// Tests using pathalogical cases for all escapings
-TEST(Base64, NaugtyStringsEncodeDecode) {
- std::string base64_string;
- std::string decoded_string;
- for (auto& str : naughty_strings) {
- EXPECT_TRUE(base64::base64_encode(str, base64_string));
- EXPECT_TRUE(base64::base64_decode(base64_string, decoded_string));
- EXPECT_EQ(str, decoded_string);
- }
-}
-
-// Tests using pathalogical cases for all escapings
-TEST(Base64, NaugtyStringsPathological) {
- std::string base64_string;
- std::string decoded_string;
- for (auto& str : naughty_strings) {
- base64::base64_decode(str, base64_string);
- }
-}
\ No newline at end of file