diff options
| -rw-r--r-- | IT-Sicherheit_SS2015_BaseProject.pro | 2 | ||||
| -rw-r--r-- | src/crypt/cbigint.cpp | 51 | ||||
| -rw-r--r-- | src/crypt/cbigint.h | 98 |
3 files changed, 0 insertions, 151 deletions
diff --git a/IT-Sicherheit_SS2015_BaseProject.pro b/IT-Sicherheit_SS2015_BaseProject.pro index 22e03ed..2fbf22f 100644 --- a/IT-Sicherheit_SS2015_BaseProject.pro +++ b/IT-Sicherheit_SS2015_BaseProject.pro @@ -31,7 +31,6 @@ SOURCES += src/main.cpp \ src/crypt/cryptrc4.cpp \ src/crypt/cryptclassevp.cpp \ src/crypt/cryptaes.cpp - src/crypt/cbigint.cpp HEADERS += src/mainwindow.h \ src/tabwidgetselectalgorithm.h \ @@ -50,7 +49,6 @@ HEADERS += src/mainwindow.h \ src/crypt/cryptrc4.h \ src/crypt/cryptclassevp.h \ src/crypt/cryptaes.h - src/crypt/cbigint.h FORMS += src/forms/mainwindow.ui \ src/forms/tabsymmetric.ui \ diff --git a/src/crypt/cbigint.cpp b/src/crypt/cbigint.cpp deleted file mode 100644 index a1aebc1..0000000 --- a/src/crypt/cbigint.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include "cbigint.h" - -CBigInt::CBigInt(int value = 0) -{ - -} - -CBigInt::CBigInt(const CBigInt & toCopy) -{ - -} - -CBigInt::~CBigInt() -{ - -} - -int CBigInt::setSize(int newSize) -{ - -} - -int CBigInt::size() const -{ - -} - -void CBigInt::setDigit(int pos, BaseType value) -{ - -} - -CBigInt CBigInt::operator +(const CBigInt & n2) -{ - -} - -const char * CBigInt::toHexString()const -{ - -} - -static bool CBigInt::isLongOk() -{ - -} - -void CBigInt::copy(const CBigInt & toCopy) -{ - -} diff --git a/src/crypt/cbigint.h b/src/crypt/cbigint.h deleted file mode 100644 index f4ea407..0000000 --- a/src/crypt/cbigint.h +++ /dev/null @@ -1,98 +0,0 @@ -#ifndef CBIGINT_H -#define CBIGINT_H - -/** - * An integer number with unlimited number of digits. Low digit is at low address. - * - * @author Walter Roth - */ - -//define the base type of the number here. Useable types are: char, short int -typedef char BaseType; -struct BaseStruct -{ - BaseType low; - BaseType high; -}; - -union LongBaseType -{ - short int allSegments; - BaseStruct Segment; -}; - -class CBigInt -{ -public: - /** - * Default constructor. Creates a number with size zero digits. - * Converts value to it's CbigInt representation. - */ - CBigInt(int value = 0); - - /** - * Copy constructor. Creates a deep copy. - */ - CBigInt(const CBigInt & toCopy); - - /** - * Destructor frees memory. - */ - ~CBigInt(); - - /** - * Sets the new size, allocates memory and initializes with 0. - * If newSize is smaller than old,* _Size is reduced as long as - * digits to delete are zero. Returns final size. - */ - int setSize(int newSize); - - /** - * Returns the number of digits available (_Size) - */ - int size() const; - - /** - * Sets digit at position to value - */ - void setDigit(int pos, BaseType value); - - /** - * Operator + - */ - CBigInt operator +(const CBigInt & n2); - - /** - * Returns the number as a hexadecimal string - */ - const char * toHexString()const; - - /** - * Returns true, if LongBaseType is twice the size of BaseType - */ - static bool isLongOk(); - -private: - /** - * Make a deep copy - */ - void copy(const CBigInt & toCopy); - -private: - /** - * The start of the digit-array. Points to LSB. - */ - BaseType * _Digits; - - /** - * The number of Digits allocated. - */ - int _Size; - - /** - * The string buffer for toXXString functions - */ - static char * _StringBuffer; -} - -#endif // CBIGINT_H |
