diff options
author | szszszsz <szszszsz@users.noreply.github.com> | 2016-09-19 09:39:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-19 09:39:23 +0200 |
commit | 10631378c61b7ce54ad6f31dc1d16c3ba4c49d32 (patch) | |
tree | fbc85095b9410d46ca65565b8de479c282e13abd /README.md | |
parent | b16e89ad4445fe9bbb66e8e7f8771a6ca6b333cf (diff) | |
download | libnitrokey-10631378c61b7ce54ad6f31dc1d16c3ba4c49d32.tar.gz libnitrokey-10631378c61b7ce54ad6f31dc1d16c3ba4c49d32.tar.bz2 |
Readme update - dependencies, compilers, format (#40)
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -2,13 +2,15 @@ # libnitrokey Libnitrokey is a project to communicate with Nitrokey stick devices in clean and easy manner. Written in C++14, testable with `Catch` framework, with C API, Python access (through CFFI and C API, in future with Pybind11). -The development of this project is aimed to make it itself a living documentation of communication protocol between host and the Nitrokey stick device. +The development of this project is aimed to make it itself a living documentation of communication protocol between host and the Nitrokey stick devices. -A C++14 complying compiler is required. +A C++14 complying compiler is required. For feature support tables please check [table 1](https://gcc.gnu.org/projects/cxx-status.html#cxx14) or [table 2](http://en.cppreference.com/w/cpp/compiler_support). + +Libnitrokey is developed with the latest compilers: g++ 5.4+, clang 3.8+ ## Getting sources This repository uses `git submodules`. -To clone please use git's --recursive option like in: +To clone please use git's `--recursive` option like in: ```bash git clone --recursive https://github.com/Nitrokey/libnitrokey.git ``` @@ -19,6 +21,11 @@ cd libnitrokey git submodule update --init --recursive ``` +## Dependencies +Following packages are needed to use libnitrokey (Debian/Ubuntu): +- libhidapi-dev [(HID API)](http://www.signal11.us/oss/hidapi/) + + ## Compilation To compile library using Clang please run `make`. If you have GCC and would like to use it instead you can run: ```bash @@ -81,14 +88,14 @@ print(hotp_slot_1_code_nitrokey_storage) libnitrokey.NK_logout() # disconnect device ``` In case one of the devices or no devices are connected, unfriendly message will be printed. -All available functions for Python are listed in NK_C_API.h. +All available functions for C and Python are listed in NK_C_API.h. Please check `Documentation` section below. ## Documentation The documentation of C API is included in the sources (could be generated with doxygen if requested). Please check NK_C_API.h (C API) for high level commands and include/NitrokeyManager.h (C++ API). All devices' commands are listed along with packet format in include/stick10_commands.h and include/stick20_commands.h respectively for Nitrokey Pro and Nitrokey Storage products. #Tests -Warning! Before you run unittests please either change both your Admin and User PINs on your Nitrostick to defaults (12345678 and 123456 respectively) or change the values in tests source code. If you do not change them the tests might lock your device. If its too late, you can always reset your Nitrokey using instructions from [homepage](https://www.nitrokey.com/de/documentation/how-reset-nitrokey). +Warning! Before you run unittests please either change both your Admin and User PINs on your Nitrostick to defaults (`12345678` and `123456` respectively) or change the values in tests source code. If you do not change them the tests might lock your device. If its too late, you can always reset your Nitrokey using instructions from [homepage](https://www.nitrokey.com/de/documentation/how-reset-nitrokey). ## Python tests Libnitrokey has a couple of tests written in Python under the path: `unittest/test_bindings.py`. The tests themselves show how to handle common requests to device. |