This is a C++ library that provides X.690 BER TLV parsing, building and encoding.
This a fork of toumilov/libtlv.
The API and library semantics might change in the future. Use at your own risk.
- GNU gcc compiler (or clang)
- CMake
Library uses C++17 features, so the compiler should support that.
Build system is CMake. The CMake project provides a static library target for libtlv.a
To use the library, it's recommended to include it as subdirectory into an existing CMake project.
To build the test target, CppUTest library is required.
The CMake project has a 'tlvutil' target for a CLI-tool to convert between different TLV data encodings.
The options for input and output are:
- Binary encoded TLV data
- Hex encoded TLV data (ASCII-HEX representation of binary data)
- Formatted TLV data -- custom data format for git-friendly representation of TLV data
See test.cpp for usage examples