$ openssl # 进入 OpenSSL 程序
OpenSSL> genrsa -out rsa_private_key.pem 1024 # 生成私钥
OpenSSL> pkcs8 -topk8 -inform PEM -in rsa_private_key.pem -outform PEM -nocrypt -out rsa_private_key_pkcs8.pem # Java开发者需要将私钥转换成 PKCS8 格式
OpenSSL> rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem # 生成公钥
OpenSSL> exit # 退出 OpenSSL 程序

  

https://docs.open.alipay.com/api_1/alipay.trade.refund/
05-17 18:15