Client Class Reference

FADE client. More...

#include <Client.h>

List of all members.

Public Member Functions

string getPath () const
void setPath (const string &path)
void setEphemerizerAddress (const string &address)
void addLocalStorage (const char *dir)
void addS3Storage (const char *bucket)
void setSecretFile (const string &secretFile)
bool upload (const string &filename, char *policyName)
bool download (const string &filename)
bool renew (const string &filename, const char *newPolicyName)
bool generateSecret ()
void readConfig (const char *filename)
void readSecret ()
unsigned int interact (const unsigned char *request, unsigned int requestLength, unsigned char *response, unsigned int responseLength)

Static Public Member Functions

static Clientinstance ()

Detailed Description

FADE client.


Member Function Documentation

void Client::addLocalStorage ( const char *  dir  )  [inline]

Add a local storage

Parameters:
dir The path of the local storage
void Client::addS3Storage ( const char *  bucket  )  [inline]

Add an Amazon S3 storage

Parameters:
bucket The bucket name of the Amazon S3 storage
bool Client::download ( const string &  filename  ) 

Download and decrypt a file

Parameters:
filename The name of the file to be downloaded and decrypted
Returns:
True if successful, otherwise false
bool Client::generateSecret (  ) 

Generate a long-term private secret

Returns:
True if successful, otherwise false
string Client::getPath (  )  const [inline]

Get the path of the local data cache

Returns:
The path of the local data cache
Client * Client::instance (  )  [static]

Singleton instance

Returns:
The singleton instance of FADE client
unsigned int Client::interact ( const unsigned char *  request,
unsigned int  requestLength,
unsigned char *  response,
unsigned int  responseLength 
)

Interact with the key manager

Parameters:
request The request data
requestLength The length of the request
response The response data
responseLength The maximum size of the response buffer
Returns:
The actural length of the response
void Client::readConfig ( const char *  filename  )  [inline]

Read and parse the configuration file

Parameters:
filename The name of the configuration file
void Client::readSecret (  ) 

Read the long-term private secret

bool Client::renew ( const string &  filename,
const char *  newPolicyName 
)

Renew a policy of a file

Parameters:
filename The name of the file whose policy is to be renewed
newPolicyName The name of the new policy
Returns:
True if successful, otherwise false
void Client::setEphemerizerAddress ( const string &  address  )  [inline]

Set the IP address of the key manager

Parameters:
address The IP address of the key manager
void Client::setPath ( const string &  path  )  [inline]

Set the path of the local data cache

Parameters:
path The path of the local data cache
void Client::setSecretFile ( const string &  secretFile  )  [inline]

Set the secret file

Parameters:
secretFile The filename where the long-term private secret is stored
bool Client::upload ( const string &  filename,
char *  policyName 
)

Encrypt and upload a file with a policy

Parameters:
filename The name of the file to be encrypted and uploaded
policyName The name of the policy
Returns:
True if successful, otherwise false

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Defines

Generated on Tue Aug 31 11:02:41 2010 for FADE by  doxygen 1.6.1