Skip to content

Conversation

@garex
Copy link

@garex garex commented Dec 10, 2016

It's not for MERGE! Only for discussing.

I played with this lib trying to replicate SignalCom keys export.
Some of changes can be used already: misspells, relative exports.

Other needs talks: base64 compatible to PEM, imports/DI.

};

if (typeof document !== 'undefiend') {
if (typeof document !== 'undefined') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лол, js такой js :-)

@garex
Copy link
Author

garex commented Dec 12, 2016

To test locally run:

sudo npm install -g https://github.com/garex/nodejs-gost-crypto/archive/nodefy.tar.gz
cd /tmp
wget https://www.contact-sys.com/files/redactor/files/TestContactKey.zip
unzip TestContactKey.zip -d TestContactKey
gost-export-signalcom-key --pse TestContactKey --key Keys/00000001.key

You should get:

-----BEGIN PRIVATE KEY-----
MEYCAQAwHQYGKoUDAgITMBMGByqFAwICIwEGCCqFAwcBAQICBCIEIG0GEmE3dhrH
zm1KfFDpKBWEmMydwcmP0hNKvXXbEbLO
-----END PRIVATE KEY-----
OK: Private SignalCom key successfully exported in STDOUT in "PEM" format.

garex added 10 commits August 28, 2018 16:04
* Always use promises
* Remove rand.opq as it's not used in export
* Store actual keys in fixtures also
* Add keys prefix to output
* Loop over keysPrefixes: 2001 and 2012
* Default of current dir to keys param
* Add secondary option
* Describe in package.json
* Output whole error and exit with code
* Add default current directory as container param
* Avoid rand.opq when exporting (signalcom)
* Optimize cli width and options width look
* Use short opts
* Output in PEM/DER formats
* Make node 0.10.x compatible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants