Skip to content

[NOT FO MERGE!] Nodefy#9

Open
garex wants to merge 23 commits into
rudonick:masterfrom
garex:nodefy
Open

[NOT FO MERGE!] Nodefy#9
garex wants to merge 23 commits into
rudonick:masterfrom
garex:nodefy

Conversation

@garex

@garex garex commented Dec 10, 2016

Copy link
Copy Markdown

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.

Comment thread lib/gostRandom.js
};

if (typeof document !== 'undefiend') {
if (typeof document !== 'undefined') {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@garex

garex commented Dec 12, 2016

Copy link
Copy Markdown
Author

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