Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 603 Bytes

README.md

File metadata and controls

15 lines (12 loc) · 603 Bytes

Copy of official Alipay SDK

RSA key pair generation

$ sudo apt-get install openssl

$ openssl
  OpenSSL> genrsa -out rsa_private_key.pem 2048 ##generating  private key
  OpenSSL> pkcs8 -topk8 -inform PEM -in rsa_private_key.pem  -outform PEM -nocrypt ##transform private key into PKCS8 format
  OpenSSL> rsa -in rsa_private_key.pem -pubout -out  rsa_public_key.pem ##Generate public key
  OpenSSL> exit

After generate keys, you need delete first and last line (keys must be without "-----BEGIN RSA PRIVATE KEY-----", "-----END RSA PRIVATE KEY----- and whitespaces)