Skip to content

rbroggi/pocolibexample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Poco lib Examples using conan and cmake

Dependencies

  1. conan - cpp dependency management
  2. cmake - building tool

Build

  1. checkout repo
    $ git clone ...
  2. jump into project directory
    $ cd pocoLibExamples
  3. fetch dependencies using conan (option --build=missing says to conan to compile dependencies in case bin not found). Another useful flag is to set the profile using the -pr <profile> flag which points to profiles containing specific compilers in the system.
    $ conan install ./ -if ./build --build=missing
  4. compile
    i. $ cmake -G "Unix Makefiles" ./ -B./build
    ii. $ cd build && make

Execute

Run binary with options:

poco_lib enc <publicKeyPath> <bin/hex/b64> <content>
poco_lib dec <privKeyPath> <pwd> <bin/hex/b64> <content>
poco_lib sign <MD5/SHA1/SHA256/SHA512> <private_key_file> <pwd> <bin/hex/b64> <content>
poco_lib verify <MD5/SHA1/SHA256/SHA512> <public_key_file_path> <signature> <signFormat:bin/hex/b64> <content>
poco_lib hash <MD5/SHA1/SHA256/SHA512> <bin/hex/b64> <content>

Profile execution

The code has an embedded profiler, thanks to Yan Chernikov for the profiler video. To use the profiler, whenever executed in debug mode a file results.json will be dumped in the directory of execution. using chrome browser you can navigate to its embedded tracer on the following address and load the json file to have a visual representation for the tracer.

Dockerfile build and simple tests

$ docker build . -t pocolibexamples

About

Example for poco lib usages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published