• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDE Support
  • Sitemap
  • Contact Us
 

qca

QCA::PGPKey

QCA::PGPKey Class Reference
[QCA user API]

Pretty Good Privacy key. More...

#include <QtCrypto>

Inheritance diagram for QCA::PGPKey:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 PGPKey (const PGPKey &from)
 PGPKey (const QString &fileName)
 PGPKey ()
 ~PGPKey ()
QDateTime creationDate () const
QDateTime expirationDate () const
QString fingerprint () const
bool inKeyring () const
bool isNull () const
bool isSecret () const
bool isTrusted () const
QString keyId () const
PGPKey & operator= (const PGPKey &from)
QString primaryUserId () const
QByteArray toArray () const
bool toFile (const QString &fileName) const
QString toString () const
QStringList userIds () const

Static Public Member Functions

static PGPKey fromArray (const QByteArray &a, ConvertResult *result=0, const QString &provider=QString())
static PGPKey fromFile (const QString &fileName, ConvertResult *result=0, const QString &provider=QString())
static PGPKey fromString (const QString &s, ConvertResult *result=0, const QString &provider=QString())

Detailed Description

Pretty Good Privacy key.

This holds either a reference to an item in a real PGP keyring, or a standalone item created using the from*() functions.

Note that with the latter method, the key is of no use besides being informational. The key must be in a keyring (that is, inKeyring() == true) to actually do crypto with it.

Definition at line 2361 of file qca_cert.h.


Constructor & Destructor Documentation

QCA::PGPKey::PGPKey (  ) 

Create an empty PGP key.

Definition at line 2677 of file qca_cert.cpp.

QCA::PGPKey::PGPKey ( const QString &  fileName  ) 

Create a PGP key from an encoded file.

Parameters:
fileName the name (and path, if required) of the file that the PGP key is to be loaded from.
See also:
fromFile for a version that allows better error checking / validation
toFile for a method to write out the key.

Definition at line 2681 of file qca_cert.cpp.

QCA::PGPKey::PGPKey ( const PGPKey &  from  ) 

Standard copy constructor.

Parameters:
from the PGPKey to use as the source

Definition at line 2686 of file qca_cert.cpp.

QCA::PGPKey::~PGPKey (  ) 

Definition at line 2691 of file qca_cert.cpp.


Member Function Documentation

QDateTime QCA::PGPKey::creationDate (  )  const

The creation date for the key.

Definition at line 2726 of file qca_cert.cpp.

QDateTime QCA::PGPKey::expirationDate (  )  const

The expiration date for the key.

Definition at line 2731 of file qca_cert.cpp.

QString QCA::PGPKey::fingerprint (  )  const

The key fingerpint.

This will return the PGP fingerprint as a string. It comprises 40 hex digits, without spaces.

Definition at line 2736 of file qca_cert.cpp.

PGPKey QCA::PGPKey::fromArray ( const QByteArray &  a,
ConvertResult *  result = 0,
const QString &  provider = QString() 
) [static]

Import the key from an array.

Parameters:
a the array to import from
result if not null, this will be set to the result of the import process
provider the provider to use, if a particular provider is required

Definition at line 2766 of file qca_cert.cpp.

PGPKey QCA::PGPKey::fromFile ( const QString &  fileName,
ConvertResult *  result = 0,
const QString &  provider = QString() 
) [static]

Import the key from a file.

Parameters:
fileName string containing the name of the file to import from
result if not null, this will be set to the result of the import process
provider the provider to use, if a particular provider is required

Definition at line 2794 of file qca_cert.cpp.

PGPKey QCA::PGPKey::fromString ( const QString &  s,
ConvertResult *  result = 0,
const QString &  provider = QString() 
) [static]

Import the key from a string.

Parameters:
s the string to import from
result if not null, this will be set to the result of the import process
provider the provider to use, if a particular provider is required

Definition at line 2780 of file qca_cert.cpp.

bool QCA::PGPKey::inKeyring (  )  const

Test if this key is in a keyring.

Returns:
true if the key is in a keyring
Note:
keys that are not in a keyring cannot be used for encryption, decryption, signing or verification

Definition at line 2741 of file qca_cert.cpp.

bool QCA::PGPKey::isNull (  )  const

Test if the PGP key is empty (null).

Returns:
true if the PGP key is null

Definition at line 2701 of file qca_cert.cpp.

bool QCA::PGPKey::isSecret (  )  const

Test if the PGP key is the secret key.

Returns:
true if the PGP key is the secret key

Definition at line 2721 of file qca_cert.cpp.

bool QCA::PGPKey::isTrusted (  )  const

Test if the key is trusted.

Returns:
true if the key is trusted

Definition at line 2746 of file qca_cert.cpp.

QString QCA::PGPKey::keyId (  )  const

The Key identification for the PGP key.

Definition at line 2706 of file qca_cert.cpp.

PGPKey & QCA::PGPKey::operator= ( const PGPKey &  from  ) 

Standard assignment operator.

Parameters:
from the PGPKey to use as the source

Reimplemented from QCA::Algorithm.

Definition at line 2695 of file qca_cert.cpp.

QString QCA::PGPKey::primaryUserId (  )  const

The primary user identification for the key.

Definition at line 2711 of file qca_cert.cpp.

QByteArray QCA::PGPKey::toArray (  )  const

Export the key to an array.

This will export the key in a binary format (that is, not in an "ascii armoured" form).

See also:
fromArray for a static import method.
toString for an "ascii armoured" export method.

Definition at line 2751 of file qca_cert.cpp.

bool QCA::PGPKey::toFile ( const QString &  fileName  )  const

Export the key to a file.

Parameters:
fileName the name of the file to save the key to

Definition at line 2761 of file qca_cert.cpp.

QString QCA::PGPKey::toString (  )  const

Export the key to a string.

This will export the key in an "ascii armoured" form.

See also:
fromString for a static import method.
toArray for a binary format export method.

Definition at line 2756 of file qca_cert.cpp.

QStringList QCA::PGPKey::userIds (  )  const

The list of all user identifications associated with the key.

Definition at line 2716 of file qca_cert.cpp.


The documentation for this class was generated from the following files:
  • qca_cert.h
  • qca_cert.cpp

qca

Skip menu "qca"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE Support

Skip menu "KDE Support"
  • akonadi
  • Decibel
  • grantlee
  • kdewin
  • phonon
  •     Backend
  • polkit-qt
  • qca
  • qimageblitz
  • soprano
  • strigi
  •     searchclient
  •     streamanalyzer
  •     streams
Generated for KDE Support by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal