mirror of
https://github.com/orange-cpp/omath.git
synced 2026-04-18 22:43:27 +00:00
added files
This commit is contained in:
@@ -2,7 +2,7 @@ add_subdirectory(example_barycentric)
|
||||
add_subdirectory(example_glfw3)
|
||||
add_subdirectory(example_proj_mat_builder)
|
||||
add_subdirectory(example_signature_scan)
|
||||
|
||||
add_subdirectory(exmple_var_encryption)
|
||||
if(OMATH_ENABLE_VALGRIND)
|
||||
omath_setup_valgrind(example_projection_matrix_builder)
|
||||
omath_setup_valgrind(example_signature_scan)
|
||||
|
||||
10
examples/exmple_var_encryption/CMakeLists.txt
Normal file
10
examples/exmple_var_encryption/CMakeLists.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
project(example_var_encryption)
|
||||
|
||||
add_executable(${PROJECT_NAME} main.cpp)
|
||||
set_target_properties(
|
||||
${PROJECT_NAME}
|
||||
PROPERTIES CXX_STANDARD 23
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/out/${CMAKE_BUILD_TYPE}"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/out/${CMAKE_BUILD_TYPE}"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/out/${CMAKE_BUILD_TYPE}")
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE omath::omath)
|
||||
15
examples/exmple_var_encryption/main.cpp
Normal file
15
examples/exmple_var_encryption/main.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// Created by orange on 24.02.2026.
|
||||
//
|
||||
#include "omath/containers/encrypted_variable.hpp"
|
||||
#include <omath/omath.hpp>
|
||||
#include <print>
|
||||
int main()
|
||||
{
|
||||
OMATH_DEF_CRYPT_VAR(int, 64) var{5};
|
||||
var.encrypt();
|
||||
std::println("{}", var.value());
|
||||
var.decrypt();
|
||||
std::println("{}", var.value());
|
||||
return var.value();
|
||||
}
|
||||
Reference in New Issue
Block a user