Client Class Reference
FADE client.
More...
#include <Client.h>
List of all members.
Detailed Description
FADE client.
Member Function Documentation
void Client::addEphemerizerAddress |
( |
const string & |
address |
) |
[inline] |
Add a key manager
- Parameters:
-
| address | The address of the key manager, in the format of "ip:port" |
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::getCpabePrivateKeyFile |
( |
|
) |
const [inline] |
Get the CP-ABE private key file
- Returns:
- Filename for the CP-ABE private key
string Client::getCpabePublicKeyFile |
( |
|
) |
const [inline] |
Get the CP-ABE public key file
- Returns:
- Filename for the CP-ABE public key
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, |
|
|
int |
keyManagerID = 0 | |
|
) |
| | |
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 |
| keyManagerID | The ID of the key manager used |
- 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
bool Client::revoke |
( |
const char * |
policyName |
) |
|
Revoke a policy
- Parameters:
-
| policyName | The name of the policy to be revoked |
- Returns:
- True if successful, otherwise false
void Client::setCpabePrivateKeyFile |
( |
const string & |
filename |
) |
[inline] |
Set the CP-ABE private key file
- Parameters:
-
| filename | Filename for the CP-ABE private key |
void Client::setCpabePublicKeyFile |
( |
const string & |
filename |
) |
[inline] |
Set the CP-ABE public key file
- Parameters:
-
| filename | Filename for the CP-ABE public key |
void Client::setNumber |
( |
int |
number |
) |
[inline] |
Set the ssss number
- Parameters:
-
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 |
void Client::setThreshold |
( |
int |
threshold |
) |
[inline] |
Set the ssss threshold
- Parameters:
-
| threshold | The ssss threshold |
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: