This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @brief - implement Safe Queue technique for passing messages between various threads / classes | |
* | |
* @copyright - 2021-present All rights reserved | |
* | |
* @author - Devendra Naga (devendra.aaru@outlook.com) | |
* | |
* @license - proprietary license, ask author for more information | |
*/ | |
#ifndef __SAFE_QUEUE_H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
project(needham_schroeder_protocol) | |
cmake_minimum_required(VERSION 3.8) | |
set(SRC | |
./ns.cc) | |
include_directories(./) | |
set(CMAKE_CXX_FLAGS "-Wall -g -ggdb") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __NS_H__ | |
#define __NS_H__ | |
#include <iostream> | |
#include <string.h> | |
#include <string> | |
#include <openssl/conf.h> | |
#include <openssl/evp.h> | |
#include <openssl/err.h> | |
#include <openssl/rsa.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ns.h> | |
static int generate_key(int key_size, const std::string pkey, const std::string ppkey) | |
{ | |
RSA *rsa = nullptr; | |
BIGNUM *b; | |
FILE *fp; | |
int ret; | |
rsa = RSA_new(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <memory> | |
#include <string.h> | |
class AddOn { | |
public: | |
explicit AddOn(std::string description) { description_ = description; } | |
~AddOn() = default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <memory> | |
#include <queue> | |
#include <thread> | |
#include <mutex> | |
#include <condition_variable> | |
#include <functional> | |
template <class T> | |
class Message_Queue { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Arduino.h" | |
class trng_device { | |
public: | |
explicit trng_device() { | |
} | |
~trng_device() { | |
} | |
virtual void init() = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <stdint.h> | |
#include <string.h> | |
#include <openssl/pem.h> | |
#include <openssl/evp.h> | |
#include <openssl/ec.h> | |
class sm2_crypto { | |
public: | |
explicit sm2_crypto() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <memory> | |
#include <vector> | |
#include <time.h> | |
#include <sys/time.h> | |
namespace Core_Middleware { | |
class Perf_Item { | |
public: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* program to demonstrate wireless ioctl | |
*/ | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <math.h> | |
#include <net/if.h> | |
#include <sys/ioctl.h> | |
#include <linux/wireless.h> |