QCA::SymmetricKey

Search for usage in LXR

QCA::SymmetricKey Class Reference

#include <QtCrypto>

Inheritance diagram for QCA::SymmetricKey:

Public Member Functions

 SymmetricKey ()
 
 SymmetricKey (const QByteArray &a)
 
 SymmetricKey (const SecureArray &a)
 
 SymmetricKey (int size)
 
bool isWeakDESKey ()
 
- Public Member Functions inherited from QCA::SecureArray
 SecureArray ()
 
 SecureArray (const char *str)
 
 SecureArray (const MemoryRegion &a)
 
 SecureArray (const QByteArray &a)
 
 SecureArray (const SecureArray &from)
 
 SecureArray (int size, char ch=0)
 
SecureArrayappend (const SecureArray &a)
 
char & at (int index)
 
const char & at (int index) const
 
void clear ()
 
const char * constData () const
 
char * data ()
 
const char * data () const
 
void fill (char fillChar, int fillToPosition=-1)
 
bool isEmpty () const
 
bool operator!= (const MemoryRegion &other) const
 
SecureArrayoperator+= (const SecureArray &a)
 
SecureArrayoperator= (const QByteArray &a)
 
SecureArrayoperator= (const SecureArray &from)
 
bool operator== (const MemoryRegion &other) const
 
char & operator[] (int index)
 
const char & operator[] (int index) const
 
bool resize (int size)
 
int size () const
 
QByteArray toByteArray () const
 
- Public Member Functions inherited from QCA::MemoryRegion
 MemoryRegion (const char *str)
 
 MemoryRegion (const MemoryRegion &from)
 
 MemoryRegion (const QByteArray &from)
 
const char & at (int index) const
 
const char * constData () const
 
const char * data () const
 
bool isEmpty () const
 
bool isNull () const
 
bool isSecure () const
 
MemoryRegionoperator= (const MemoryRegion &from)
 
MemoryRegionoperator= (const QByteArray &from)
 
int size () const
 
QByteArray toByteArray () const
 

Additional Inherited Members

- Protected Member Functions inherited from QCA::SecureArray
void set (const QByteArray &from)
 
void set (const SecureArray &from)
 
- Protected Member Functions inherited from QCA::MemoryRegion
 MemoryRegion (bool secure)
 
 MemoryRegion (const QByteArray &from, bool secure)
 
 MemoryRegion (int size, bool secure)
 
char & at (int index)
 
char * data ()
 
bool resize (int size)
 
void set (const QByteArray &from, bool secure)
 
void setSecure (bool secure)
 

Detailed Description

Container for keys for symmetric encryption algorithms.

Examples
aes-cmac.cpp, ciphertest.cpp, and mactest.cpp.

Definition at line 1263 of file qca_core.h.

Constructor & Destructor Documentation

◆ SymmetricKey() [1/4]

QCA::SymmetricKey::SymmetricKey ( )

Construct an empty (zero length) key.

◆ SymmetricKey() [2/4]

QCA::SymmetricKey::SymmetricKey ( int size)

Construct an key of specified size, with random contents.

This is intended to be used as a random session key.

Parameters
sizethe number of bytes for the key

◆ SymmetricKey() [3/4]

QCA::SymmetricKey::SymmetricKey ( const SecureArray & a)

Construct a key from a provided byte array.

Parameters
athe byte array to copy

◆ SymmetricKey() [4/4]

QCA::SymmetricKey::SymmetricKey ( const QByteArray & a)

Construct a key from a provided byte array.

Parameters
athe byte array to copy

Member Function Documentation

◆ isWeakDESKey()

bool QCA::SymmetricKey::isWeakDESKey ( )

Test for weak DES keys.

Returns
true if the key is a weak key for DES

The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:48:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.