Cipherpack v1.2.0-dirty
A Cryprographic Stream Processor
Classes | Typedefs | Functions
commandline.cpp File Reference
#include <iostream>
#include <fstream>
#include <cassert>
#include <cinttypes>
#include <cstring>
#include <cipherpack/cipherpack.hpp>
#include <jau/debug.hpp>
#include <unistd.h>
Include dependency graph for commandline.cpp:

Go to the source code of this file.

Classes

class  LoggingCipherpackListener
 

Typedefs

typedef std::shared_ptr< LoggingCipherpackListenerLoggingCipherpackListenerRef
 

Functions

int main (int argc, char *argv[])
 cipherpack command line tool. More...
 
static void print_usage (const char *progname)
 
static void print_version ()
 

Typedef Documentation

◆ LoggingCipherpackListenerRef

Examples
commandline.cpp, and test_01_cipherpack.cpp.

Definition at line 92 of file commandline.cpp.

Function Documentation

◆ print_version()

static void print_version ( )
static
Examples
commandline.cpp.

Definition at line 94 of file commandline.cpp.

Here is the caller graph for this function:

◆ print_usage()

static void print_usage ( const char *  progname)
static
Examples
commandline.cpp.

Definition at line 98 of file commandline.cpp.

Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *  argv[] 
)

cipherpack command line tool.

Examples:

  • File based operation
    • cipherpack pack -epk test_keys/terminal_rsa1.pub.pem -ssk test_keys/host_rsa1 -out a.enc plaintext.bin
    • cipherpack unpack -spk test_keys/host_rsa1.pub.pem -dsk test_keys/terminal_rsa1 -out a.dec a.enc
    • cipherpack hash -out a.hash jaulib/test_data
  • Pipe based operation
    • cat plaintext.bin | cipherpack pack -epk test_keys/terminal_rsa1.pub.pem -ssk test_keys/host_rsa1 > a.enc
    • cat a.enc | cipherpack unpack -spk test_keys/host_rsa1.pub.pem -dsk test_keys/terminal_rsa1 > a.dec
    • cat a.dec | cipherpack hash jaulib/test_data
  • Pipe based full streaming
    • cat plaintext.bin | cipherpack pack -epk test_keys/terminal_rsa1.pub.pem -ssk test_keys/host_rsa1 | cipherpack unpack -spk test_keys/host_rsa1.pub.pem -dsk test_keys/terminal_rsa1 > a.dec
Parameters
argc
argv
Returns
Examples
commandline.cpp.

Definition at line 129 of file commandline.cpp.