If you store data on a SmartDongle you may wish to encrypt the data transmitted over the USB bus.
Examples 3 below use AES encryption. A developer could use example3a.c as a utility to write passwords, serial numbers, etc to a SmartDongle that can be read back and used in an application as demonstrated by example3b.c
Example 4 below takes advantage of Java Object Serialization.
If SmartDongle access returns error codes 41 or 42, the problem may be that the mode of the dynamic SmartDongle device files in /proc/bus/usb/ and /dev/bus/usb/ do not allow user access.
As of linux kernel version 2.6.x, permissions can be set with hal facilities.
Refer to src/HAL/README.txt
The absolute path to the project directory such as: WORKING_DIR="/home/your_home_directory/SmartDongle JNI Examples"
Path Java Development kit binaries
JAVA_HOME=/opt/sun-jdk-1.5.0.13
Path to GNU gcc complier:
CC=/usr/bin/gcc