Переглянути джерело

added new constructors to make something easier in epoch calculation code

tristangurtler 3 роки тому
батько
коміт
8838b079ce
2 змінених файлів з 11 додано та 0 видалено
  1. 2 0
      prsona/inc/EGCiphertext.hpp
  2. 9 0
      prsona/src/EGCiphertext.cpp

+ 2 - 0
prsona/inc/EGCiphertext.hpp

@@ -5,6 +5,8 @@
 
 class EGCiphertext {
     public:
+        EGCiphertext();
+        EGCiphertext(const Curvepoint& mask, const Curvepoint& encryptedMessage);
         Curvepoint mask;
         Curvepoint encryptedMessage;
 

+ 9 - 0
prsona/src/EGCiphertext.cpp

@@ -1,5 +1,14 @@
 #include "EGCiphertext.hpp"
 
+EGCiphertext::EGCiphertext()
+{ /* Do nothing */ }
+
+EGCiphertext::EGCiphertext(const Curvepoint& mask, const Curvepoint& encryptedMessage)
+{
+    this->mask = mask;
+    this->encryptedMessage = encryptedMessage;
+}
+
 bool EGCiphertext::operator==(const EGCiphertext& other) const
 {
     return mask == other.mask && encryptedMessage == other.encryptedMessage;