• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

libkpgp

  • Kpgp
  • Block
Public Member Functions | List of all members
Kpgp::Block Class Reference

#include <kpgpblock.h>

Public Member Functions

 Block (const QByteArray &str=QByteArray())
 
 ~Block ()
 
Kpgp::Result clearsign (const QByteArray &keyId, const QByteArray &charset=QByteArray())
 
bool decrypt ()
 
Kpgp::Result encrypt (const QStringList &receivers, const QByteArray &keyId, const bool sign, const QByteArray &charset=QByteArray())
 
const QStringList encryptedFor () const
 
QByteArray error () const
 
bool goodSignature () const
 
bool isEncrypted () const
 
bool isSigned () const
 
QByteArray requiredKey () const
 
QString requiredUserId () const
 
void reset ()
 
void setError (const QByteArray &str)
 
void setProcessedText (const QByteArray &str)
 
void setRequiredKey (const QByteArray &keyId)
 
void setRequiredUserId (const QString &userId)
 
void setSignatureDate (const QByteArray &date)
 
void setSignatureKeyId (const QByteArray &keyId)
 
void setSignatureUserId (const QString &userId)
 
void setStatus (const int status)
 
void setText (const QByteArray &str)
 
QByteArray signatureDate () const
 
QByteArray signatureKeyId () const
 
QString signatureUserId () const
 
int status () const
 
QByteArray text () const
 
BlockType type () const
 
bool verify ()
 

Detailed Description

Definition at line 89 of file kpgpblock.h.

Constructor & Destructor Documentation

Kpgp::Block::Block ( const QByteArray &  str = QByteArray())
explicit

Definition at line 27 of file kpgpblock.cpp.

Kpgp::Block::~Block ( )

Definition at line 35 of file kpgpblock.cpp.

Member Function Documentation

Kpgp::Result Kpgp::Block::clearsign ( const QByteArray &  keyId,
const QByteArray &  charset = QByteArray() 
)

clearsigns this OpenPGP block with the key corresponding to the given key id.

The charset is needed to display the text correctly. Returns false if there was an unresolvable error or if signing was canceled true if everything is o.k.

Definition at line 114 of file kpgpblock.cpp.

bool Kpgp::Block::decrypt ( )

decrypts this OpenPGP block if the passphrase is good.

returns false otherwise

Definition at line 92 of file kpgpblock.cpp.

Kpgp::Result Kpgp::Block::encrypt ( const QStringList &  receivers,
const QByteArray &  keyId,
const bool  sign,
const QByteArray &  charset = QByteArray() 
)

encrypts this OpenPGP block for a list of persons.

if sign is true then the message is signed with the key corresponding to the given key id. Returns false if there was an unresolvable error or if encryption was canceled true if everything is o.k.

Definition at line 125 of file kpgpblock.cpp.

const QStringList Kpgp::Block::encryptedFor ( ) const
inline

the persons who can decrypt the message

Definition at line 308 of file kpgpblock.h.

QByteArray Kpgp::Block::error ( ) const
inline

Definition at line 216 of file kpgpblock.h.

bool Kpgp::Block::goodSignature ( ) const
inline

is the signature good ?

Definition at line 330 of file kpgpblock.h.

bool Kpgp::Block::isEncrypted ( ) const
inline

is the message encrypted ?

Definition at line 314 of file kpgpblock.h.

bool Kpgp::Block::isSigned ( ) const
inline

is the message signed by someone

Definition at line 322 of file kpgpblock.h.

QByteArray Kpgp::Block::requiredKey ( ) const
inline

shows the secret key which is needed to decrypt the message

Definition at line 284 of file kpgpblock.h.

QString Kpgp::Block::requiredUserId ( ) const
inline

Definition at line 296 of file kpgpblock.h.

void Kpgp::Block::reset ( )

Resets all information about this OpenPGP block.

Definition at line 40 of file kpgpblock.cpp.

void Kpgp::Block::setError ( const QByteArray &  str)
inline

Definition at line 222 of file kpgpblock.h.

void Kpgp::Block::setProcessedText ( const QByteArray &  str)
inline

Definition at line 209 of file kpgpblock.h.

void Kpgp::Block::setRequiredKey ( const QByteArray &  keyId)
inline

Definition at line 290 of file kpgpblock.h.

void Kpgp::Block::setRequiredUserId ( const QString &  userId)
inline

Definition at line 302 of file kpgpblock.h.

void Kpgp::Block::setSignatureDate ( const QByteArray &  date)
inline

Definition at line 278 of file kpgpblock.h.

void Kpgp::Block::setSignatureKeyId ( const QByteArray &  keyId)
inline

Definition at line 266 of file kpgpblock.h.

void Kpgp::Block::setSignatureUserId ( const QString &  userId)
inline

Definition at line 254 of file kpgpblock.h.

void Kpgp::Block::setStatus ( const int  status)
inline

Definition at line 234 of file kpgpblock.h.

void Kpgp::Block::setText ( const QByteArray &  str)
inline

Definition at line 202 of file kpgpblock.h.

QByteArray Kpgp::Block::signatureDate ( ) const
inline

date of the signature WARNING: Will most likely be changed to QDateTime

Definition at line 272 of file kpgpblock.h.

QByteArray Kpgp::Block::signatureKeyId ( ) const
inline

keyID of signer

Definition at line 260 of file kpgpblock.h.

QString Kpgp::Block::signatureUserId ( ) const
inline

returns the primary user id of the signer or a null string if we don't have the public key of the signer

Definition at line 248 of file kpgpblock.h.

int Kpgp::Block::status ( ) const
inline

Definition at line 228 of file kpgpblock.h.

QByteArray Kpgp::Block::text ( ) const
inline

Definition at line 193 of file kpgpblock.h.

BlockType Kpgp::Block::type ( ) const
inline

Definition at line 240 of file kpgpblock.h.

bool Kpgp::Block::verify ( )

tries to verify this (clearsigned) OpenPGP block

Definition at line 103 of file kpgpblock.cpp.


The documentation for this class was generated from the following files:
  • kpgpblock.h
  • kpgpblock.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:48 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkpgp

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal