Home  >  Article  >  Backend Development  >  Android client Alipay PHP server-side writing_PHP tutorial

Android client Alipay PHP server-side writing_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:31:39734browse

Generate private key

Enter the "genrsa -out rsa_private_key.pem 1024" command, press Enter, in the current bin file A rsa_private_key.pem file will be added to the directory, and the file is the original merchant private key (Please save the file properly , PHP This file is required for development languages),

Generate public key

Enter "rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem" and press Enter, in the current bin A new rsa_public_key.pem file will be added to the file directory, which is the original merchant public key (Please save the file properly,PHP This file is required for development language)

Generate pkcs8 for Android

Enter the command "pkcs8 -topk8 -inform PEM -in rsa_private_key.pem -outform PEM -nocrypt" and press Enter

The php server needs the rsa_private_key.pem just generated and the alipay_public_key.pem from the demo provided by Alipay

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/762284.htmlTechArticleTo generate a private key, enter the genrsa -out rsa_private_key.pem 1024 command. After pressing Enter, it will be in the current bin file directory. Add a new rsa_private_key.pem file, which is the original merchant private key...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn