libcdoc 0.1.8
libcdoc Namespace Reference

Classes

class  CDocReader
 Provides decryption interface. More...
 
class  CDocWriter
 Provides encryption interface. More...
 
struct  ChainedConsumer
 
struct  ChainedSource
 
struct  Configuration
 A configuration provider. More...
 
class  ConsoleLogger
 Console logger. More...
 
struct  CryptoBackend
 An authentication provider. More...
 
struct  DataConsumer
 The DataConsumer class. More...
 
struct  DataSource
 The DataSource class. More...
 
struct  FileInfo
 A simple container of file name and size. More...
 
struct  FileListConsumer
 
struct  FileListSource
 
class  ILogger
 Generic interface to implement a logger. More...
 
struct  IStreamSource
 
struct  JSONConfiguration
 A Configuration object implementation that reads values from JSON file. More...
 
struct  Lock
 A descriptor of decryption scheme in container. More...
 
struct  MultiDataConsumer
 An abstract base class for multi-stream consumers. More...
 
struct  MultiDataSource
 An abstract base class for multi-stream sources. More...
 
struct  NetworkBackend
 
struct  OStreamConsumer
 
struct  PKCS11Backend
 A convenience class for PKCS11 based cryptographic operations. More...
 
struct  Recipient
 A descriptor of encryption method and key to be used in container. More...
 
struct  VectorConsumer
 
struct  VectorSource
 
struct  WinBackend
 A convenience class for Windows NCrypt cryptographic operations. More...
 

Typedefs

typedef int64_t result_t
 A typedef that indicates that integer value may contain libcdoc result code.
 

Enumerations

enum  {
  OK = 0 , END_OF_STREAM = 1 , NOT_IMPLEMENTED = -100 , NOT_SUPPORTED = -101 ,
  WRONG_ARGUMENTS = -102 , WORKFLOW_ERROR = -103 , IO_ERROR = -104 , OUTPUT_ERROR = -105 ,
  OUTPUT_STREAM_ERROR = -106 , INPUT_ERROR = -107 , INPUT_STREAM_ERROR = -108 , WRONG_KEY = -109 ,
  DATA_FORMAT_ERROR = -110 , CRYPTO_ERROR = -111 , ZLIB_ERROR = -112 , PKCS11_ERROR = -113 ,
  HASH_MISMATCH = -114 , CONFIGURATION_ERROR = -115 , NOT_FOUND = -116 , UNSPECIFIED_ERROR = -199
}
 

Functions

CDOC_EXPORT std::string getErrorStr (int64_t code)
 
CDOC_EXPORT std::string getVersion ()
 
template<typename... Args>
static void LogFormat (ILogger::LogLevel level, std::string_view file, int line, fmt::format_string< Args... > fmt, Args &&... args)
 
static void LogFormat (ILogger::LogLevel level, std::string_view file, int line, std::string_view msg)
 

Typedef Documentation

◆ result_t

typedef int64_t libcdoc::result_t

A typedef that indicates that integer value may contain libcdoc result code.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
OK 

Operation completed successfully.

END_OF_STREAM 

No more input data.

A pseudo-error that indicates that there are no more streams in MultiDataSource

NOT_IMPLEMENTED 

A method is not implemented.

NOT_SUPPORTED 

An operation is not supported.

WRONG_ARGUMENTS 

Conflicting or invalid arguments for a method.

WORKFLOW_ERROR 

Components of multi-method workflow are called in wrong order.

IO_ERROR 

A generic input/output error.

OUTPUT_ERROR 

A generic output error.

OUTPUT_STREAM_ERROR 

An error while writing output stream.

INPUT_ERROR 

A generic input error.

INPUT_STREAM_ERROR 

An error while reading input stream.

WRONG_KEY 

The supplied decryption key is wrong.

DATA_FORMAT_ERROR 

Data format of a file (or sub-object inside a file) is wrong.

CRYPTO_ERROR 

Generic error in cryptography subsystem.

ZLIB_ERROR 

Comppression/decompression error in zlib.

PKCS11_ERROR 

Generic error in PKCS11 subsystem.

HASH_MISMATCH 

The value of cryptographic hash is not correct.

CONFIGURATION_ERROR 

Generic error in configuration susbsytem.

NOT_FOUND 

Object not found.

UNSPECIFIED_ERROR 

Unspecified error.

Function Documentation

◆ getErrorStr()

CDOC_EXPORT std::string libcdoc::getErrorStr ( int64_t  code)

◆ getVersion()

CDOC_EXPORT std::string libcdoc::getVersion ( )

◆ LogFormat() [1/2]

template<typename... Args>
static void libcdoc::LogFormat ( ILogger::LogLevel  level,
std::string_view  file,
int  line,
fmt::format_string< Args... >  fmt,
Args &&...  args 
)
inlinestatic

◆ LogFormat() [2/2]

static void libcdoc::LogFormat ( ILogger::LogLevel  level,
std::string_view  file,
int  line,
std::string_view  msg 
)
inlinestatic