Files
tldr/pages.zh/common/openssl-genrsa.md

16 lines
450 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# openssl genrsa
> OpenSSL命令用于生成RSA私钥。
> 更多信息:<https://www.openssl.org/docs/manmaster/man1/openssl-genrsa.html>。
- 生成一个2048位的RSA私钥并输出到`stdout`
`openssl genrsa`
- 将一个任意位数的RSA私钥保存到输出文件
`openssl genrsa -out {{output_file.key}} {{1234}}`
- 生成一个RSA私钥并使用AES256加密您将被要求输入密码短语
`openssl genrsa {{-aes256}}`