Disk ARchive  2.5.17
Full featured and portable backup and archiving tool
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules
Public Member Functions | List of all members
libdar::crypto_asym Class Reference

Inherits libdar::mem_ui.

Public Member Functions

 crypto_asym (const user_interaction &ui)
 general use constructor
 ~crypto_asym ()
 the destructor
 crypto_asym (const crypto_asym &ref)
 disabling copy constructor
const crypto_asymoperator= (const crypto_asym &ref)
 disabling object assignment
void set_signatories (const std::vector< std::string > &signatories)
 defines the list of email which associated key will be used for signing
void encrypt (const std::vector< std::string > &recipients_email, generic_file &clear, generic_file &ciphered)
void decrypt (generic_file &ciphered, generic_file &clear)
const std::list< signator > & verify () const
user_interactionget_ui () const
 exposing to public visibility the protected method of mem_ui
- Public Member Functions inherited from libdar::mem_ui
 mem_ui (const user_interaction &dialog)
 constructor More...
 mem_ui (user_interaction *dialog)
 mem_ui (const mem_ui &ref)
 the copy constructor More...
virtual ~mem_ui () throw (Ebug)
 destructor More...
const mem_uioperator= (const mem_ui &ref)
 assignement operator More...

Additional Inherited Members

- Protected Member Functions inherited from libdar::mem_ui
user_interactionget_ui () const
 get access to the user_interaction cloned object More...

Detailed Description

Definition at line 50 of file crypto_asym.hpp.

Member Function Documentation

void libdar::crypto_asym::decrypt ( generic_file ciphered,
generic_file clear 

un-cipher data

[in]cipheredcontains the encrypted data to decipher
[out]clearresulting un-ciphered (thus clear) data (the object must be readable)
this assumes the GnuPG keyring has an appropriated private key (the objet must be writable)
void libdar::crypto_asym::encrypt ( const std::vector< std::string > &  recipients_email,
generic_file clear,
generic_file ciphered 

encrypt (and sign if signatures have been given using set_signatories) data for the given recipients

[in]recipients_emaillist of email of recipient that will be able to read the encrypted data
[in]clearwhere to read from clear data to be encrypted (the object must be readable)
[out]cipheredwhere to write down encrypted data (the object must be writable)
this assumes the GnuPG keyring has the public keys of the recipient listed
const std::list<signator>& libdar::crypto_asym::verify ( ) const

after un-ciphering data retrieve the list of signature that were used beside encryption return a sorted list of signatories

Definition at line 86 of file crypto_asym.hpp.

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