Logo Search packages:      
Sourcecode: yapet version File versions  Download package

std::list< PartDec > File::read ( const Key key  )  const throw (YAPETException)

Reads the stored password records from the file.

Reads the stored records from the file using the key provided and returns a list holding the partially decrypted records. If the file has no records stored, it returns an empty list.

Parameters:
key the key used to decrypt the records. It has to be same key that was used to encrypt the records, of course.
Returns:
a list holding the partially decrypted records. Or an empty list if no records are stored in the file
See also:
PartDec

Definition at line 729 of file file.cc.

References read(), and seekDataSection().

                                                     {
    seekDataSection();

    BDBuffer* buff = NULL;
    std::list<PartDec> retval;

    try {
      buff = read();
      while (buff != NULL) {
          retval.push_back(PartDec(*buff, key));
          delete buff;
          buff = read();
      }
    } catch (YAPETException& ex) {
      if (buff != NULL)
          delete buff;
      throw;
    }

    return retval;
}


Generated by  Doxygen 1.6.0   Back to index