Qt Cryptographic Architecture
|
Go to the documentation of this file.
39 #include <QSharedData>
40 #include <QSharedDataPointer>
204 const char &
at(
int index)
const;
262 char &
at(
int index);
280 void set(
const QByteArray &from,
bool secure);
298 QSharedDataPointer<Private> d;
437 char &
at(
int index);
444 const char &
at(
int index)
const;
486 void fill(
char fillChar,
int fillToPosition = -1);
518 return !(*
this == other);
543 void set(
const QByteArray &from);
771 return (compare(other) == 0);
782 return !(*
this == other);
794 return (compare(other) <= 0);
806 return (compare(other) >= 0);
818 return (compare(other) < 0);
830 return (compare(other) > 0);
835 QSharedDataPointer<Private> d;
848 QCA_EXPORT QTextStream &operator<<(QTextStream &stream,
const BigInteger &b);
bool operator>=(const BigInteger &other) const
Greater than or equal operator.
Definition: qca_tools.h:804
bool operator==(const MemoryRegion &other) const
Equality operator.
MemoryRegion(const QByteArray &from, bool secure)
Create a memory region, optionally using secure storage.
bool operator!=(const MemoryRegion &other) const
Inequality operator.
Definition: qca_tools.h:516
bool operator==(const BigInteger &other) const
Equality operator.
Definition: qca_tools.h:769
SecureArray & operator=(const QByteArray &a)
Creates a copy, rather than references.
bool resize(int size)
Resize the memory region to the specified size.
void clear()
Clears the contents of the array and makes it empty.
void setSecure(bool secure)
Convert the memory region to use the specified memory type.
const char & operator[](int index) const
Returns a reference to the byte at the index position.
QCA_EXPORT const SecureArray operator+(const SecureArray &a, const SecureArray &b)
Returns an array that is the result of concatenating a and b.
MemoryRegion(int size, bool secure)
Create a memory region, optionally using secure storage.
BigInteger & operator/=(const BigInteger &b)
Divide in place operator.
char * data()
Convert the contents of the memory region to a C-compatible character array.
bool isSecure() const
Test if the MemoryRegion is using secure memory, or not.
bool operator<=(const BigInteger &other) const
Less than or equal operator.
Definition: qca_tools.h:792
BigInteger & operator%=(const BigInteger &b)
Modulo in place operator.
bool operator>(const BigInteger &other) const
Greater than operator.
Definition: qca_tools.h:828
bool operator<(const BigInteger &other) const
Less than operator.
Definition: qca_tools.h:816
MemoryRegion(bool secure)
Create a memory region, optionally using secure storage.
QCA - the Qt Cryptographic Architecture.
Definition: qca_basic.h:41
void fill(char fillChar, int fillToPosition=-1)
Fill the data array with a specified character.
MemoryRegion & operator=(const MemoryRegion &from)
Standard assignment operator.
QCA::SecureArray toArray() const
Output BigInteger as a byte array, useful for storage or transmission.
const char * constData() const
Pointer to the data in the secure array.
SecureArray & operator+=(const SecureArray &a)
Append a secure byte array to the end of this array.
BigInteger & operator+=(const BigInteger &b)
void fromArray(const QCA::SecureArray &a)
Assign from an array.
const char * constData() const
Convert the contents of the memory region to a C-compatible character array.
QByteArray toByteArray() const
Copy the contents of the secure array out to a standard QByteArray.
MemoryRegion(const char *str)
Constructs a new Memory Region from a null terminated character array.
BigInteger(const QCA::SecureArray &a)
This is an overloaded member function, provided for convenience. It differs from the above function o...
SecureArray(int size, char ch=0)
Construct a secure byte array of the specified length.
SecureArray & operator=(const SecureArray &from)
Creates a reference, rather than a deep copy.
bool isEmpty() const
Returns true if the size of the memory region is zero.
SecureArray(const MemoryRegion &a)
Construct a secure byte array from a MemoryRegion.
SecureArray(const SecureArray &from)
Construct a (shallow) copy of another secure byte array.
BigInteger(const BigInteger &from)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool resize(int size)
Change the length of this array If the new length is less than the old length, the extra information ...
BigInteger & operator-=(const BigInteger &b)
char & operator[](int index)
Returns a reference to the byte at the index position.
Definition: qca_tools.h:317
BigInteger(int n)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qca_tools.h:571
BigInteger & operator=(const BigInteger &from)
int compare(const BigInteger &n) const
BigInteger & operator=(const QString &s)
This is an overloaded member function, provided for convenience. It differs from the above function o...
const char & at(int index) const
Obtain the value of the memory location at the specified position.
BigInteger & operator*=(const BigInteger &b)
Multiply in place operator.
void set(const QByteArray &from, bool secure)
Modify the memory region to match a specified byte array.
BigInteger(const char *c)
void set(const QByteArray &from)
Assign the contents of a provided byte array to this object.
void set(const SecureArray &from)
Assign the contents of a provided byte array to this object.
SecureArray(const char *str)
Construct a secure byte array from a string.
const char * data() const
Pointer to the data in the secure array.
QByteArray toByteArray() const
Convert this memory region to a byte array.
Definition: qca_tools.h:91
SecureArray(const QByteArray &a)
Construct a secure byte array from a QByteArray.
const char & at(int index) const
Returns a reference to the byte at the index position.
char & at(int index)
Returns a reference to the byte at the index position.
SecureArray & append(const SecureArray &a)
Append a secure byte array to the end of this array.
bool operator!=(const BigInteger &other) const
Inequality operator.
Definition: qca_tools.h:780
MemoryRegion(const QByteArray &from)
Constructs a new MemoryRegion from the data in a byte array.
bool fromString(const QString &s)
Assign from a QString.
MemoryRegion & operator=(const QByteArray &from)
Standard assignment operator.
bool isEmpty() const
Test if the array contains any bytes.
bool isNull() const
Test if the MemoryRegion is null (i.e.
MemoryRegion(const MemoryRegion &from)
Standard copy constructor.
SecureArray()
Construct a secure byte array, zero length.
BigInteger(const QString &s)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int size() const
Returns the number of bytes in the array.
char * data()
Pointer to the data in the secure array.
char & at(int index)
Obtain the value of the memory location at the specified position.
int size() const
Returns the number of bytes in the memory region.
const char * data() const
Convert the contents of the memory region to a C-compatible character array.