An interface to diCrPQC.dll
for C++ programmers using STL (C++11 or above).Requires CryptoSys PQC to be installed on your system, available from https://www.cryptosys.net/pqc/. In particular that diCrPQC.dll
is in your library path.
- Required files
- Required files to compile in a C++ project:
crsyspqc.hpp
diCrPQC.h
crsyspqc.cpp
{main}.cpp
int main() { ... }
The C++ (STL) interface to the CryptoSys PQC.
- Example minimal program
#include <iostream>
int main() {
std::cout << "Version=" << n << std::endl;
}
static int SignatureSize(Alg alg)
Return length of signature in bytes.
@ SLH_DSA_SHA2_128F
SLH-DSA-SHA2-128f from FIPS.205.
static int Version()
Get version number of the core native DLL as an integer value.
- Compiling and linking
- You must link to the library file
diCrPQC.lib
.
- In MSVC++ IDE, use
Project > Properties > Linker > Input > Additional Dependencies
and add the full path to diCrPQC.lib
. E.g. Additional Dependencies = $(OutDir)diCrPQC.lib;%(AdditionalDependencies)
- Using the command-line with MSVC:
CL test.cpp crsyspqc.cpp /link ..\Debug\diCrPQC.lib
- Using GCC (make sure the DLL has been compiled for target X64):
g++ -std=c++11 test.cpp crsyspqc.cpp "C:\fullpath\to\x64\Debug\diCrPQC.lib"
- Don't forget to compile together with
crsyspqc.cpp
, and have the files crsyspqc.hpp
and diCrPQC.h
in the same directory.