Comments (9)
the colons param is for pretty printing the key, it's not rare to find a hex encoded sha1 written like this: a6:b3:c2:d1:...
instead of a6b3c2d1...
from key-fingerprint.
i see that you have written the cli in javascript (es5) and not typescript. would you mind to upgrade the code to es6+ and/or typescript? thanks.
from key-fingerprint.
I'll take a look!
from key-fingerprint.
@JEpifanio90 i've just added a live example here: https://github.com/phra/key-fingerprint/blob/master/examples/index.ts
it would be nice to have the cli taking as options the hash and encoding algorithm and as argument a file path, e.g.
no colons:
npx key-fingerprint --hash sha1 --encoding hex cert.pem
with colons:
npx key-fingerprint --hash sha1 --encoding hex --colons cert.pem
from key-fingerprint.
@phra Sure thing! I'll let you know as soon as I have something
from key-fingerprint.
@phra Does this look like what you have in mind?
from key-fingerprint.
@JEpifanio90 looks good, but i prefer to see the code, which libraries did you have used?
btw besides the nice cli-UI we need also something less fancy for scripting usage. 😄
from key-fingerprint.
Here's the code https://github.com/JEpifanio90/key-fingerprint/blob/20bf6c62789e905e1c0bd87611927a532196ad2a/cli/index.js
You can either call the script with no parameters and it will show up the menu (like the screenshot) or call it with a one liner like index.js --hash asd123 --encoding sha1 --colons true
Btw, I didn't quite get what does the "colons" param do 🤓
from key-fingerprint.
Right! I'll make the PR later today 😄
from key-fingerprint.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from key-fingerprint.