Pipet - c++ library for building lightweight processing pipeline at compile-time for string obfuscation, aes ciphering or whatever you want

Related tags

Miscellaneous pipet
Overview

Pipet

Build Status

Pipet is a lightweight c++17 headers-only library than can be used to build simple processing pipelines at compile time.

Features

  • Compile-time pipeline building from a set of user-defined filters
  • Compile-time or runtime pipeline execution
  • Creation of reversible pipelines (if all filters in the pipeline are reversible)
  • Creation of branches (handling of multiple input filters)

Supported Platforms

Tests have been performed on the following platforms:

  • g++-7 on linux (ci)
  • clang++-7 (ci)

Install

  • Clone project
    > git clone https://github.com/kenavolic/pipet.git
  • Generate build system
    > mkdir pipet_build
    > cd pipet_build
    > cmake -DCMAKE_INSTALL_PREFIX=$path_to_pipet_install_dir -DPIPET_BUILD_EXAMPLES=[ON|OFF] -DPIPET_BUILD_TESTS=[ON|OFF] ../pipet
  • Compilation
    > make
    > make install
+ /!\ On windows, open generated solution and build solution and install target

Usage

Examples

The projet include the following examples:

  • AES ciphering at compile time
  • String obfuscation at compile time
  • Mask generation at compile time

Import pipet to your project

  • In your CMakeLists.txt, import pipet
    find_package(pipet REQUIRED)
    ...
    target_link_libraries(my_proj pipet::pipet)
  • Configure your project to find pipet package
    > cmake -DCMAKE_PREFIX_PATH=$path_to_pipet_install_dir/cmake $path_to_your_proj_source_dir

Implement a pipeline

The example directory provide two examples of pipet usage. Basically, all you need to do is:

  • Create your filters with a static process and optionnaly static reverse function
    struct filter
    {
        static constexpr out_type process(in_type my_param)
        {
            // do processing
            return my_result;
        }
        
        static constexpr in_type reverse(out_type my_param)
        {
            // do processing
            return my_result;
        }
    };
  • Build your pipeline
    using my_processing_pipe = pipet::pipe<filter1, filter2, filter3>;
  • Run it
    constexpr auto res = my_processing_pipe::process(); // if filter 1 is a data generator (no input type)
    constexpr auto res = my_processing_pipe::process(var); // if filter 1 is processing filter
  • Create branches
  struct f1_proc_ct {
    static constexpr auto process(int a) { return a; }
  };

  // compute a*a
  struct f_square_ct {
    static constexpr auto process(int a) { return a * a; }
  };

  // compute a*a*a
  struct f_cube_ct {
    static constexpr auto process(int a) { return a * a * a; }
  };

  // add 3 different inputs
  struct f_add3_ct {
    static constexpr auto process(int a, int b, int c) { return a + b + c; }
  };

  using branch1_t = pipet::pipe<f1_proc_ct, f_square_ct>;
  using branch2_t = pipet::pipe<f_cube_ct, f1_proc_ct>;

  // y = x*x + x*x + x*x*x
  using pipe_with_branches_t =
      pipet::pipe<f1_proc_ct, pipet::branches<branch1_t, branch1_t, branch2_t>,
                  f_add3_ct>;
  
  static_assert(pipe_with_branches_t::process(2) == 16,
                "[-][pipet_test] pipe processing failed");
  • Create branches with a direct connection
  ... (see previous sample)

  // y = x + x*x + x*x*x
  using pipe_with_direct_branches_t = pipet::pipe<
      f1_proc_ct,
      pipet::branches<pipet::placeholders::self, branch1_t, branch2_t>,
      f_add3_ct>;
  static_assert(pipe_with_direct_branches_t::process(2) == 14,
                "[-][pipet_test] pipe processing failed");

Owner
C. G.
C. G.
User space configuration tool for RME HDSPe MADI / AES / RayDAT / AIO and AIO Pro cards driven by the snd-hdspe driver.

hdspeconf User space configuration tool for RME HDSPe MADI / AES / RayDAT / AIO and AIO Pro cards, driven by the snd-hdspe driver. Building hdspeconf

Philippe Bekaert 9 Jun 15, 2022
­čÄâ Submit creative FizzBuzz solutions in any language you want! Open for beginners !

?? Hacktoberfest 2021 FizzBuzz Submit creative FizzBuzz solutions in any language you want! TL;DR: We're searching for creative/extraordinary/weird Fi

Shubh4nk 15 May 14, 2022
Best practices, conventions, and tricks for ROS. Do you want to become a robotics master? Then consider graduating or working at the Robotics Systems Lab at ETH in Z├╝rich!

ROS Best Practices, Conventions and Tricks Best practices for ROS2 in the making. See the Foxy branch in the meanwhile. This is a loose collection of

Robotic Systems Lab - Legged Robotics at ETH Z├╝rich 1.1k Jun 24, 2022
header-only UTF-8 string functions based on STL-string

utf8_xxx header-only UTF-8 string functions based on STL-string size_t utf8_len(const std::string& _Str) std::string utf8_sub(const std::string& _Str,

Voidmatrix 2 Dec 27, 2021
C Program to input a string and adjust memory allocation according to the length of the string.

C-String C Program to input a string and adjust memory allocation according to the length of the string. With the help of this program, we have replic

Kunal Kumar Sahoo 1 Jan 20, 2022
A simple thread-safe implementation of runtime obfuscation for Win32 applications.

Thread-Safe Win32 Runtime Obfuscation A simple thread-safe implementation of runtime obfuscation for Win32 applications. The main use case for this is

Daniel 1 Mar 6, 2022
x64 PE-COFF virtualization driven obfuscation engine

Singularity Prerequisite To use and build this library you will have to have the following installed: Python version 2.7 / 3.4 or higher Git msbuild (

Lima X 24 Jun 13, 2022
Had a tough time playing Microsoft Wordament ? Well WORDament_Solver has your back. It suggests you meaningful words you can use while playing the game and help you top the leaderboard.

WORDament_Solver Had a tough time playing Microsoft Wordament ? Well WORDament_Solver has your back. It suggests you meaningful words you can use whil

Tushar Agarwal 3 Aug 19, 2021
This PoC uses two diferent technics for stealing the primary token from all running processes, showing that is possible to impersonate and use whatever token present at any process

StealAllTokens This PoC uses two diferent technics for stealing the primary token from all running processes, showing that is possible to impersonate

lab52.io 42 Jun 15, 2022
C/C++ Application to solve irrigation rotation whatever two-turn rotation or three-turn rotation, longitudinal section design, hydraulic calculations, and design of hydraulic structures like weirs and tail escape.

Irrigation works C/C++ Application to solve irrigation rotation whatever two-turn rotation or three-turn rotation, longitudinal section design, hydrau

Mohamed Jamal Ghayyad 1 Jun 24, 2022
A run-time C++ library for working with units of measurement and conversions between them and with string representations of units and measurements

Units What's new Some of the CMake target names have changed in the latest release, please update builds appropriately Documentation A library that pr

Lawrence Livermore National Laboratory 103 Jun 24, 2022
The Xnoe Operating System, for people who want an OS that is useless.

Xnoe OS An attempt at writing an "Operating System" in x86 assembler. Hi all, I have many hobbies, one of those is torturing myself with knowledge I p

Xnoe 8 May 17, 2022
Wtf Riot? I just want to close League of Legends and live my life. Leave me alone. F*ck corporate adware.

RiotKiller Wtf Riot? Anyways... This application launches League of Legends by calling RiotClientServices.exe --launch-product=league_of_legends --lau

Alejandro Romano 1 Mar 29, 2022
This Repo Is Mainly For Developers Who Want to Contribute .

HacktoberFest-2021 Hacktoberfest 2021 Link To HacktoberFest 2021 Event details : Hacktoberfest® is open to everyone in our global community. Whether y

Vivek Kumar Gupta 6 Oct 25, 2021
DimensionalAnalysis - A compact C++ header-only library providing compile-time dimensional analysis and unit awareness

Dimwits ...or DIMensional analysis With unITS is a C++14 library for compile-time dimensional analysis and unit awareness. Minimal Example #include <i

NJOY 7 Feb 1, 2022
[WIP] Experimental C++14 multithreaded compile-time entity-component-system library.

ecst Experimental & work-in-progress C++14 multithreaded compile-time Entity-Component-System header-only library. Overview Successful development of

Vittorio Romeo 443 Jun 16, 2022
Vireo is a lightweight and versatile video processing library written in C++11

Overview Vireo is a lightweight and versatile video processing library that powers our video transcoding service, deep learning recognition systems an

Twitter 851 Jun 20, 2022
Modern C++ 20 compile time OpenAPI parser and code generator implementation

OpenApi++ : openapipp This is a proof of concept, currently under active work to become the best OpenAPI implementation for C++. It allows compile tim

tipi.build 5 Apr 8, 2022