Programming with OpenPACE

Using OpenPACE in C/C++

See also

The OpenPACE API documentation has all details of the native C/C++ interface.

Here we have a small example in C:

See also

Have a look at the nPA Smart Card Library [2] for a more complex project that uses the C Interface from OpenPACE.

Using OpenPACE in Python

Python bindings must be configured with --enable-python. They depend on SWIG and Python.

In case of a non-standard installation of OpenPACE you might – in addition to LD_LIBRARY_PATH – also need to setup the PYTHONPATH environment variable.

Here is a sample script that shows how OpenPACE is accessed from Python:

See also

Have a look at the Emulator for the German Identity Card [3] for a more complex project that uses the Python Interface from OpenPACE.

Unfortunately, OpenPACE’s Python bindings are currently poorly documented:

New in version 0.8: The SWIG bindings from pyPACE [1] have been integrated into OpenPACE.

Using OpenPACE in Ruby

Ruby bindings must be configured with --enable-ruby. They depend on SWIG and Ruby.

Here is a sample script that shows how OpenPACE is accessed from Ruby:

New in version 0.9: Added Ruby bindings.

Using OpenPACE in Go

Go bindings must be configured with --enable-go. They depend on SWIG and gccgo.

Here is a sample program that shows how OpenPACE is accessed from Go:

New in version 0.9: Added Go bindings.

Using OpenPACE in Java

Ruby bindings must be configured with --enable-java. They depend on SWIG, a java compiler and the JNI developement headers. You may set the JAVAC environment variable to your preferred Java compiler.

Here is a sample program that shows how OpenPACE is accessed from Java:

Using OpenPACE in Javascript

Technically the process for getting OpenPACE into Javascript is similar to cross compiling. It is covered in Compiling for Javascript

[1]http://pypace.sourceforge.net
[2]https://frankmorgner.github.io/vsmartcard/npa/README.html
[3]https://frankmorgner.github.io/vsmartcard/virtualsmartcard/README.html