Holds a partially decrypted record. More...
#include <partdec.h>

Public Member Functions | |
| const char * | c_str () const |
| const BDBuffer & | getEncRecord () const |
| Get the encrypted password record. | |
| const uint8_t * | getName () const |
| Get the plain text name of the password record. | |
| bool | operator< (const PartDec &pd) const |
| const PartDec & | operator= (const PartDec &pd) |
| PartDec (Record< PasswordRecord > &pr, const Key &key) throw (YAPETException) | |
| PartDec (const PartDec &pd) | |
| PartDec (BDBuffer &bd, const Key &key) throw (YAPETException) | |
| PartDec () | |
| void | setRecord (Record< PasswordRecord > &pr, const Key &key) throw (YAPETException) |
| ~PartDec () | |
Private Attributes | |
| BDBuffer | enc_data |
| The encrypted password record. | |
| uint8_t | name [NAME_SIZE] |
| The record name in plain text. | |
Partially decrypted records have their name stored in plain text. The other fields of the password record remain encrypted. This class is used for convenience. It relieves the user of writing code for decrypting the record in order to get only the record name.
The File class uses this class when reading and returning the records stored in a file. It also expects a list of PartDec object when writing password records to the file.
The encrypted data is also attached to this class as a BDBuffer.
Definition at line 66 of file partdec.h.
| PartDec::PartDec | ( | ) |
Definition at line 42 of file partdec.cc.
References name, and YAPET::NAME_SIZE.
| PartDec::PartDec | ( | BDBuffer & | bd, | |
| const Key & | key | |||
| ) | throw (YAPETException) |
Definition at line 46 of file partdec.cc.
References YAPET::Crypt::decrypt(), and YAPET::NAME_SIZE.

| PartDec::PartDec | ( | Record< PasswordRecord > & | pr, | |
| const Key & | key | |||
| ) | throw (YAPETException) |
Definition at line 55 of file partdec.cc.
| PartDec::PartDec | ( | const PartDec & | pd | ) |
Definition at line 59 of file partdec.cc.
References name, and YAPET::NAME_SIZE.
| PartDec::~PartDec | ( | ) |
Definition at line 63 of file partdec.cc.
References name, and YAPET::NAME_SIZE.
| const char* YAPET::PartDec::c_str | ( | ) | const [inline] |
This method has been added because YAPET::UI::ListWidget expects the object assigned to the list being displayed to have a public method called c_str().
Get the plain text name of the password record.
Returns the pointer to the plain text name of the password record.
Definition at line 128 of file partdec.h.
References name.
| const BDBuffer& YAPET::PartDec::getEncRecord | ( | ) | const [inline] |
| const uint8_t* YAPET::PartDec::getName | ( | ) | const [inline] |
| bool PartDec::operator< | ( | const PartDec & | pd | ) | const |
This is mainly used for sorting the entries...
Definition at line 91 of file partdec.cc.
References name.
Definition at line 78 of file partdec.cc.
References enc_data, name, and YAPET::NAME_SIZE.
| void PartDec::setRecord | ( | Record< PasswordRecord > & | pr, | |
| const Key & | key | |||
| ) | throw (YAPETException) |
Definition at line 68 of file partdec.cc.
References YAPET::Crypt::encrypt(), YAPET::PasswordRecord::name, and YAPET::NAME_SIZE.

BDBuffer YAPET::PartDec::enc_data [private] |
This is the encrypted password record.
Definition at line 79 of file partdec.h.
Referenced by getEncRecord(), and operator=().
uint8_t YAPET::PartDec::name[NAME_SIZE] [private] |
The password record name in plain text.
Definition at line 73 of file partdec.h.
Referenced by c_str(), getName(), operator<(), operator=(), PartDec(), and ~PartDec().
1.7.1