You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importlic_manageraslic# Load `P_DATA` from python `bytes` type a=b"1234567890qwertyuiopasdfghjklzxcvbnm"idata=lic.P_DATA()
idata.m_write(a, len(a))
# Encrypt `P_DATA`edata=lic.P_DATA()
lic.encrypt(idata, edata)
# e = edata.m_read(edata.size, False)# print(e)# Decrypt `P_DATA`ddata=lic.P_DATA()
lic.decrypt(edata, ddata)
# d = ddata.m_read(ddata.size, False)# print(d)
Licensepp Sever
Build pybind11 expose
cd build
cmake ..
make -j$(nproc)
sudo make install
Start server
python3 server.py --host 0.0.0.0 --port 6464
Format C++ code
apt install clang-format -y
clang-format -style=microsoft -dump-config > .clang-format
sed -i 's/AlwaysBreakTemplateDeclarations: MultiLine/AlwaysBreakTemplateDeclarations: Yes/g' .clang-format
# To use
find . -regex '.*\.\(c\|cc\|cpp\|cxx\|cu\|h\|hh\|hpp\|hxx\|inl\|inc\|ipp\|m\|mm\)$' -exec clang-format -style=file -i {} \;
Pre-commit
python3 -m pip install pre-commit
pre-commit install # runs every time you commit in git
pre-commit run -a # To use
pre-commit autoupdate # To update this file