TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

You won't remember the OpenSSL options, so here's bash shortcuts for everything

6 点作者 mikemaccana超过 9 年前

4 条评论

atoponce超过 9 年前
On the one hand, this is really quite good. I&#x27;m always interested in making my time at the command line more efficient. If I put this in my shell&#x27;s config, and remember the function names, I&#x27;m golden.<p>On the other hand, I&#x27;ve learned more from continuing to read the manpages than probably anything else. And the OpenSSL commands that I use frequently, such as connecting to a site with TLS, or checking a certificate chain, can now be easily recalled from memory, and I feel I&#x27;m better off for it, especially if I&#x27;m at a terminal where my OpenSSL functions might not be installed.
atoponce超过 9 年前
Encrypting files should probably include a salt-per-file, otherwise the same file contents will produce the same ciphertext when the same passphrase is provided.<p><pre><code> function openssl-encrypt() { openssl enc -aes-256-cbc -salt -in &quot;${1}&quot; -out &quot;${2}&quot; }</code></pre>
blakesterz超过 9 年前
This is great. Now I just need to remember the shortcuts! I have such a giant collection of bash short cuts in my .bashrc and other dotfiles that I can&#x27;t seem to remember ANY of them and end up just typing everything out in the end :-)
gt99超过 9 年前
function openssl-key-to-pin() { openssl rsa -in &quot;${1}&quot; -outform der -pubout | openssl dgst -sha256 -binary | openssl enc -base64 }<p>function openssl-website-to-pin() { openssl s_client -connect ${1}:443 | openssl x509 -pubkey -noout | openssl rsa -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64 }
评论 #10844840 未加载