aboutsummaryrefslogtreecommitdiff
path: root/CST 126/Homework 2/Homework2
diff options
context:
space:
mode:
authorChanin Timbal <[email protected]>2024-05-02 15:36:00 -0700
committerChanin Timbal <[email protected]>2024-05-02 15:36:00 -0700
commit8a6f64ec67e0bf7d7cd829e7ac701de2a5930458 (patch)
treeed6431470e2f456395c6bee9df0c4e8d31f77ffa /CST 126/Homework 2/Homework2
parentHomework 2 first commit (diff)
downloadhomework-1-chaninnohea-8a6f64ec67e0bf7d7cd829e7ac701de2a5930458.tar.xz
homework-1-chaninnohea-8a6f64ec67e0bf7d7cd829e7ac701de2a5930458.zip
wrote some code for the encoding function in the helper file
Diffstat (limited to 'CST 126/Homework 2/Homework2')
-rw-r--r--CST 126/Homework 2/Homework2/Base64Converter.hpp19
-rw-r--r--CST 126/Homework 2/Homework2/helpers.hpp2
2 files changed, 18 insertions, 3 deletions
diff --git a/CST 126/Homework 2/Homework2/Base64Converter.hpp b/CST 126/Homework 2/Homework2/Base64Converter.hpp
index 704079b..36e55e4 100644
--- a/CST 126/Homework 2/Homework2/Base64Converter.hpp
+++ b/CST 126/Homework 2/Homework2/Base64Converter.hpp
@@ -1,10 +1,25 @@
#ifndef BASE64_CONVERTER_HPP
#define BASE64_CONVERTER_HPP
+char characterMap[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
+'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
+'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
+'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
+'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '/', '+'};
-//encode
-//decode
+inline char* Base64Encode(char* buffer, size_t& size)
+{
+
+
+
+
+
+
+
+
+
+}
#endif \ No newline at end of file
diff --git a/CST 126/Homework 2/Homework2/helpers.hpp b/CST 126/Homework 2/Homework2/helpers.hpp
index 0aa6251..e448cc9 100644
--- a/CST 126/Homework 2/Homework2/helpers.hpp
+++ b/CST 126/Homework 2/Homework2/helpers.hpp
@@ -8,7 +8,7 @@ inline char* ReadTextFromFile(const char* fileName, char* buffer)
return buffer;
}
-inline char* ReadFileAsBinary(const char* fileName, char* buffer)
+inline char* ReadFileAsBinary(const char* fileName, char* buffer, size_t& size)
{
try
{