Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 1.8 KB

Readme.md

File metadata and controls

37 lines (29 loc) · 1.8 KB

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