Running DecodeESPFromPassword

The DecodeESPFromPassword sample application decodes a password-protected .pp7m file generated by Entrust Entelligence Security Provider (ESP) 9.3 or higher.

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

java -classpath classes;../lib/enttoolkit.jar;<jakarta.mail-api.jar> com.entrust.toolkit.examples.cms.DecodeESPFromPassword <in_pp7m> <out_pp7m>

Parameter

Value

<jakarta.mail-api.jar>

The path on your computer of the angus-mail.jar third-party library downloaded from https://eclipse-ee4j.github.io/angus-mail/#Download_Angus_Mail_Release

<input_pp7m>

The path of the input .pp7m password-protected file.

<output_pp7m>

The path of decoded .pp7m file.

For example:

C:\etjava\examples>java -classpath classes;..\lib\enttoolkit.jar;c:\java\lib\jakarta.mail-api.jar com.entrust.toolkit.examples.cms.DecodeESPFromPassword TestFileFromESP.txt.pp7m ~Sample7~
Extracting Recipient Info
 
Password RecipientInfo type
Alg Param Id: PBKDF2 with parameter
salt: 6F:B4:93:A9:47:F2:F5:A8
iteration: 10000
key length: 32
password: 7E:53:61:6D:70:6C:65:37:7E
Key derivation Algorithm: SEQUENCE[C] = 1 elements
OBJECT ID = id-hmacWithSHA1
 
CONTENT-TYPE of file is:
application/pkcs7-mime;
name="smime.p7m";
smime-type="authenticated-data"
 
This is SMime Authenticated Data
Authenticated Attributes size: 0
UnAuthenticated Attributes size: 0
OriginatorInfo: null
The Recipient Key: RAW key: 8C:96:A4:99:0E:71:3B:65:CA:B1:F2:69:27:FB:A8:15:4D:51:10:D0:58:7C:C8:45:34:FB:2E:27:2F:75:84:A5:A8:C7:
42:FE:83:CB:80:5C:DE:67:DB:B8:E8:79:B3:18:E5:26:C5:00:D9:39:CC:24:6F:8A:59:67:5E:29:C7:89
MAC Verified!
 
CONTENT-TYPE of compressed content inside authenticated data is:
application/pkcs7-mime;
name="smime.p7m";
smime-type="compressed-data"
 
This is a Compressed Data Stream
CONTENT-TYPE:
text/plain;
name="TestFileFromESP.txt"
 
Unencrypted contents is of type String.
The original file content is:
 
This is a file that has been password protected by Entrust Entelligence Security Provider.