dstucrypt-agent

Signing tool for DSTU4145

Usage no npm install needed!

<script type="module">
  import dstucryptAgent from 'https://cdn.skypack.dev/dstucrypt-agent';
</script>

README

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