How do you generate your RSA Private and Public keys for VodaPay Mini-Programs Authentication?

Viewed 71

I am currently developing a mini-program for Vodapay and I need to generate the RSA key pairs to be able to sign my requests to the Vodapay backend.

Is there a recommended method or suggested tools I should use in order to generate my public-private key-pair for my VodaPay mini-program?

1 Answers

I managed to figure this out, the keys need to be generated through open SSL and they need to be stored as a .pem file

The bash commands required to get the keys are as follows, it will create the keys

Create RSA 2048 Keysopenssl genrsa -out rsa_2048_key.pem 2048

Export Public Keyopenssl rsa -in rsa_2048_key.pem -out rsa_public_key.pem -pubout

Export Private Key with PKCS#8 Encodeopenssl pkcs8 -topk8 -in rsa_2048_key.pem -out rsa_private_key.pem -nocrypt
Related