| encpdfmax | The sample wraps a JPG image file ( leaves.jpg) into three security layers - Encrypted, Signed & Encrypted to create leaves.jpg.p7m file. S/MIME heqaders are added only to the middle layer. Each layer is added by an instance of p7mTool, the instances being connected by pipes. Additionaly, the intermediate p7m files - inner layers are stored in separate files for debug purposes. | | encpdfmax.bat:
"%p7mToolDir%\p7mTool" layer1.stj.txt | |
"%p7mToolDir%\p7mTool" layer2.stj.txt | |
"%p7mToolDir%\p7mTool" layer3.stj.txt | |
"%p7mToolDir%\p7mTool" layer4.stj.txt |
|
layer1.stj.txt
-wc Encrypt jpg max! |
-fd |
-rf reports/layer1.report.txt |
-of@STDOUT;output/layer1.p7m |
-if Data/sample.pdf |
-ce *ab.txt |
|
layer2.stj.txt
--p7mheaders |
--forcedirectories |
--reportfile reports/layer2.report.txt |
--outputfile @STDOUT;output/layer2.p7m |
--signwith *ab.txt |
|
layer3.stj.txt
-of@STDOUT;output/layer3.p7m |
-fd |
-rf reports/layer3.report.txt |
-ce*ab.txt |
|
layer4.stj.txt
--Base64 |
--ReportFile leaves.report.txt |
--OutputFile leaves.jpg.p7m |
|
|
|
| |