``` # 生成私钥 openssl genrsa -out app_private_key.pem 1024 # Java开发者需要将私钥转换成PKCS8格式 openssl pkcs8 -topk8 -inform PEM -in app_private_key.pem -outform PEM -nocrypt -out app_private_key_pkcs8.pem # 生成公钥 openssl rsa -in app_private_key.pem -pubout -out app_public_key.pem echo '生成成功' echo '--------------------------------' echo 'app_private_key.pem 开发者RSA私钥,非 Java 语言适用' echo 'app_private_key_pkcs8.pem pkcs8格式开发者RSA私钥,Java语言适用' echo 'app_public_key.pem 开发者RSA公钥' echo '--------------------------------' ```