OTPNitro
 All Classes Files Functions Variables Macros
Public Member Functions | List of all members
Page Class Reference

Page operations class. More...

#include <page.h>

Public Member Functions

 Page (void)
 The constructor sets all parameters from the Config object. More...
 
bool generate (string)
 Generate a complete Book using Page::get() and write it to the disk. More...
 
bool write (int, string, string)
 
int next (string)
 Returns the next unused page num for a book. More...
 
bool burn (int, string)
 Secure page file delete. More...
 
string read (int, string)
 Get the ciphertext page from a given book. More...
 
string get ()
 Generate ciphertext page using the Rand class. More...
 
string list ()
 Returns a list of valid books. More...
 

Detailed Description

Page operations class.

Constructor & Destructor Documentation

Page::Page ( void  )

The constructor sets all parameters from the Config object.

Returns
Page object

Member Function Documentation

bool Page::burn ( int  page,
string  id 
)

Secure page file delete.

Parameters
pagePage num
idBook ID
Returns
(bool) true == ok
bool Page::generate ( string  id)

Generate a complete Book using Page::get() and write it to the disk.

Parameters
idNew book ID
Returns
(bool) true == ok
string Page::get ( )

Generate ciphertext page using the Rand class.

Returns
ciphertext
string Page::list ( )

Returns a list of valid books.

Returns
files
int Page::next ( string  id)

Returns the next unused page num for a book.

Parameters
idBook ID
Returns
(int)pagenum
string Page::read ( int  page,
string  id 
)

Get the ciphertext page from a given book.

Parameters
pagePage num
idBook ID
Returns
ciphertext
bool Page::write ( int  page,
string  id,
string  ciphertext 
)

The documentation for this class was generated from the following files: