0.0.2 • Published 9 years ago

dstucrypt-agent v0.0.2

Weekly downloads
2
License
BSD
Repository
github
Last release
9 years ago

Usage

Sign and encrypt file with transport header

Ready to send to tax office:

node index.js --sign --crypt  otrimano.cer \
            --key Key-6.dat:password \
            --cert cert.sign.der --cert cert.cryp.der \
            --input zvit.xml --output zvit.xml.sign.enc \
            --email ilya.muromec@gmail.com

Sign file

If email is not specified in commandline, transport header would not be added.

node index.js --sign \
            --key Key-6.dat:password \
            --cert cert.sign.der \
            --input zvit.xml --output zvit.xml.sign

Load key from nonencrypted store

node index.js --sign \
            --key Key-6.raw \
            --cert cert.sign.der \
            --input zvit.xml --output zvit.xml.sign

Encrypt only

Notice, that both certificates are specified. This is implementation requirement, not really needed in code.

node index.js --crypt  otrimano.cer \
            --key Key-6.dat:password \
            --cert cert.sign.der --cert cert.cryp.der \
            --input zvit.xml --output zvit.xml.sign.enc