summaryrefslogtreecommitdiff
path: root/Untracked/Doxygen/CryptClass/AESCrypt.hpp
diff options
context:
space:
mode:
authormanzerbredes <loic.guegan_secondary@yahoo.fr>2015-03-21 06:55:46 +0100
committermanzerbredes <loic.guegan_secondary@yahoo.fr>2015-03-21 06:55:46 +0100
commit77affb6d5564f691ea337a3971fdc85f2460ed92 (patch)
tree616fa9d799bce32c2e068cfd3a3b9c7d4736e5cb /Untracked/Doxygen/CryptClass/AESCrypt.hpp
parent7f5576ded6e14724202b8bb25861f272341b0dd6 (diff)
Make untracked folder
Diffstat (limited to 'Untracked/Doxygen/CryptClass/AESCrypt.hpp')
-rw-r--r--Untracked/Doxygen/CryptClass/AESCrypt.hpp71
1 files changed, 71 insertions, 0 deletions
diff --git a/Untracked/Doxygen/CryptClass/AESCrypt.hpp b/Untracked/Doxygen/CryptClass/AESCrypt.hpp
new file mode 100644
index 0000000..a8fa976
--- /dev/null
+++ b/Untracked/Doxygen/CryptClass/AESCrypt.hpp
@@ -0,0 +1,71 @@
+/**
+ * @file AESCrypt.hpp
+ * @brief AESCrypt class header
+ * @author manzerbredes
+ * @date 8 Mars 2015
+ *
+ * Contain all prototypes of AESCrypt class.
+ *
+ */
+
+//----- std -----
+#include "AbstractSKA.hpp"
+#include "HASHCrypt.hpp"
+#include <iostream>
+
+//----- crypto++ -----
+#include <crypto++/aes.h>
+#include <crypto++/modes.h>
+#include <crypto++/filters.h>
+
+
+/**
+ * @class AESCrypt AESCrypt.hpp "/CryptClass/AESCrypt.hpp"
+ * @brief Class for Advanced Encryption Standard (AES) algorithm
+ * @author manzerbredes
+ *
+ * This class provide AES encrypt and decrypt.
+ *
+ */
+
+class AESCrypt : public AbstractSKA {
+
+
+ public:
+ AESCrypt();
+ ~AESCrypt();
+
+
+ /**
+ * @brief Encrypt data with AES algorithm.
+ *
+ * @param key : key to encrypt data
+ * @param data : contain data to encrypt.
+ *
+ * @return string : correspond to crypted data
+ *
+ * Encrypt data, and return them in a string.
+ * Padding are blank space.
+ *
+ */
+ virtual std::string encrypt(std::string key, std::string data);
+
+ /**
+ * @brief Decrypt data from AES algorithm.
+ *
+ * @param key : key used to encrypt data
+ * @param data : contain data to decrypt from AES encrypt.
+ *
+ * @return string : correspond to decrypted data
+ *
+ * Decrypt data, and return them in a string.
+ * Padding is not removed.
+ *
+ */
+ virtual std::string decrypt(std::string key, std::string data);
+
+ private:
+ HASHCrypt hash; ///< hash instance to generate SHA-256 hash code.
+
+
+};