KeyringFile class.  
 More...
#include <keyring_file.h>
 | 
|   | KeyringFile ()=default | 
|   | 
| void  | set_header (const std::string &data) | 
|   | Sets additional data to be stored with the file but will not be encrypted.  More...
  | 
|   | 
| void  | save (const std::string &file_name, const std::string &key) const | 
|   | Saves keyring to file.  More...
  | 
|   | 
| void  | load (const std::string &file_name, const std::string &key) | 
|   | Load keyring from file.  More...
  | 
|   | 
| std::string  | read_header (const std::string &file_name) | 
|   | Read header data from file.  More...
  | 
|   | 
|   | KeyringMemory ()=default | 
|   | 
| std::vector< char >  | serialize (const std::string &key) const | 
|   | Serializes and encrypts keyring data to memory buffer.  More...
  | 
|   | 
| void  | parse (const std::string &key, const char *buffer, std::size_t buffer_size) | 
|   | Parses and decrypts keyring data.  More...
  | 
|   | 
| void  | store (const std::string &uid, const std::string &attribute, const std::string &value) override | 
|   | Stores an attribute value in an entry.  More...
  | 
|   | 
| std::string  | fetch (const std::string &uid, const std::string &attribute) const override | 
|   | Retrieves attribute value from an entry.  More...
  | 
|   | 
| bool  | remove (const std::string &uid) override | 
|   | Removes an entry.  More...
  | 
|   | 
| bool  | remove_attribute (const std::string &uid, const std::string &attribute) override | 
|   | Removes an attribute from an entry.  More...
  | 
|   | 
| const std::map< std::string, std::map< std::string, std::string > > &  | entries () const | 
|   | 
|   | Keyring ()=default | 
|   | 
|   | Keyring (const Keyring &)=default | 
|   | 
| Keyring &  | operator= (const Keyring &)=default | 
|   | 
| virtual  | ~Keyring ()=default | 
|   | 
KeyringFile class. 
Implements Keyring interface and provides additional methods for loading and saving keyring to file. 
 
◆ KeyringFile()
  
  
      
        
          | mysql_harness::KeyringFile::KeyringFile  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
default   | 
  
 
 
◆ load()
      
        
          | void mysql_harness::KeyringFile::load  | 
          ( | 
          const std::string &  | 
          file_name,  | 
        
        
           | 
           | 
          const std::string &  | 
          key  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Load keyring from file. 
- Parameters
 - 
  
    | [in] | file_name | Keyring file name.  | 
    | [in] | key | Key used for decryption. | 
  
   
- Exceptions
 - 
  
    | std::exception | Loading from file failed.  | 
  
   
 
 
◆ read_header()
      
        
          | std::string mysql_harness::KeyringFile::read_header  | 
          ( | 
          const std::string &  | 
          file_name | ) | 
           | 
        
      
 
Read header data from file. 
- Parameters
 - 
  
    | [in] | file_name | Keyring file name. | 
  
   
- Exceptions
 - 
  
    | std::exception | Loading from file failed.  | 
  
   
 
 
◆ save()
      
        
          | void mysql_harness::KeyringFile::save  | 
          ( | 
          const std::string &  | 
          file_name,  | 
        
        
           | 
           | 
          const std::string &  | 
          key  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
Saves keyring to file. 
- Parameters
 - 
  
    | [in] | file_name | Keyring file name.  | 
    | [in] | key | Key used for encryption. | 
  
   
- Exceptions
 - 
  
    | std::exception | Saving to file failed.  | 
  
   
 
 
◆ set_header()
      
        
          | void mysql_harness::KeyringFile::set_header  | 
          ( | 
          const std::string &  | 
          data | ) | 
           | 
        
      
 
Sets additional data to be stored with the file but will not be encrypted. 
- Parameters
 - 
  
    | [in] | data | to store in header  | 
  
   
 
 
◆ header_
  
  
      
        
          | std::string mysql_harness::KeyringFile::header_ | 
         
       
   | 
  
private   | 
  
 
 
The documentation for this class was generated from the following files: