DCSModulesAPI  1.0.0
DCS sub project containing all the control modules as libraries.
Classes | Namespaces | Macros | Functions
internal.h File Reference
#include <vector>
#include <array>
#include <thread>
#include <atomic>
#include <condition_variable>
#include <mutex>
#include <functional>
#include <type_traits>
#include "../../DCS_Utils/include/DCS_ModuleUtils.h"

Go to the source code of this file.

Classes

struct  DCS::Threading::TPool
 
struct  DCS::DB::User
 
class  DCS::Core::PID
 

Namespaces

 DCS::Threading
 Handles threading and asynchronicity.
 

Macros

#define DCS_SHA256_DIGEST_LENGTH   32
 

Functions

DCS_INTERNAL_TEST TPool * DCS::Threading::CreatePersistentPool (u16 size, std::vector< std::function< void(std::mutex *, std::condition_variable *, std::array< std::atomic_int, 16 > *)>> workers)
 
DCS_INTERNAL_TEST void DCS::Threading::JoinPool (TPool *pool)
 
DCS_INTERNAL_TEST u64 DCS::Threading::GetPoolWorkCount (TPool *pool)
 
DCS_INTERNAL_TEST void DCS::Threading::DestroyPool (TPool *pool)
 
DCS_INTERNAL_TEST void DCS::DB::LoadDefaultDB ()
 
DCS_INTERNAL_TEST void DCS::DB::CloseDB ()
 
DCS_INTERNAL_TEST void DCS::DB::LoadUsers ()
 
DCS_INTERNAL_TEST void DCS::DB::AddUser (const char *username, const char *password)
 
DCS_INTERNAL_TEST void DCS::DB::RemoveUserByUsername (const char *username)
 
DCS_INTERNAL_TEST u64 DCS::DB::FindUserByUsername (const char *username)
 
DCS_INTERNAL_TEST User DCS::DB::GetUser (const char *username)
 
DCS_INTERNAL_TEST const User * DCS::DB::GetAllUsers ()
 
DCS_INTERNAL_TEST u64 DCS::DB::GetUserCount ()
 
DCS_INTERNAL_TEST void DCS::Auth::InitCryptoRand ()
 
DCS_INTERNAL_TEST void DCS::Auth::GenerateSalt (DCS::u8 salt[8])
 
DCS_INTERNAL_TEST void DCS::Auth::GenerateRandSafeIV128 (DCS::u8 iv[16])
 
DCS_INTERNAL_TEST void DCS::Auth::SHA256Str (const char *string, DCS::u8 hash[DCS_SHA256_DIGEST_LENGTH])
 
DCS_INTERNAL_TEST void DCS::Auth::HexStringifyBytes (char *out, DCS::u8 *hash, DCS::u64 size)
 
DCS_INTERNAL_TEST void DCS::Auth::EncryptAES256 (DCS::u8 *to_encrypt, int to_encrypt_size, DCS::u8 *aad, int aad_size, DCS::u8 *key, DCS::u8 *iv, DCS::u8 *encrypted_out, DCS::u8 *tag)
 
DCS_INTERNAL_TEST int DCS::Auth::DecryptAES256 (DCS::u8 *cipher, int cipher_size, DCS::u8 *aad, int aad_size, DCS::u8 *key, DCS::u8 *iv, DCS::u8 *plain_out, DCS::u8 *tag)