Running the Encode sample

The Encode sample signs and encrypts PKCS #7 messages.

To run this sample application, execute the following command line in the etjava/examples directory.

java -classpath classes;../lib/enttoolkit.jar com.entrust.toolkit.examples.pkcs7.Encode <epf_file> <epf_pwd> <input> <output> [-dir <ip>] [<cert>]

Parameter

Value

<epf_file>

The path of an Entrust user profile in .epf file format.

<epf_pwd>

The password for accessing the Entrust profile.

<input>

The path of the input file to encode.

<output>

The path of the encoded output file

<ip>

An optional IP address

<cert>

An optional list of certificate file paths.

For example:

C:\etjava\examples>java -classpath classes;../lib/enttoolkit.jar com.entrust.toolkit.examples.pkcs7.Encode data/userdata/RSAUser1.epf ~Sample7~ data/testfiles/test.txt data/testfiles/test.p7m
 
profile: data/userdata/RSAUser1.epf
password: ~Sample7~
input file: data/testfiles/test.txt
output file: data/testfiles/test.p7m
offline
 
login
done
encoding
done