# QCA::SymmetricKey Class Reference
[QCA user API]

Container for keys for symmetric encryption algorithms. More...

`#include <QtCrypto>`

Inheritance diagram for QCA::SymmetricKey:

Collaboration diagram for QCA::SymmetricKey:

[legend]

List of all members.

## Public Member Functions

bool | isWeakDESKey ()
| SymmetricKey (const QByteArray &a)
| SymmetricKey (const SecureArray &a)
| SymmetricKey (int size)
| SymmetricKey ()

## Detailed Description

Container for keys for symmetric encryption algorithms.

Examples:

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

## Constructor & Destructor Documentation

QCA::SymmetricKey::SymmetricKey | ( |  | ) |

Construct an empty (zero length) key.

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:

  | size | the number of bytes for the key

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

Construct a key from a provided byte array.

Parameters:

  | a | the byte array to copy

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

Construct a key from a provided byte array.

Parameters:

  | a | the byte array to copy

## Member Function Documentation

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:

- qca_core.h