Home >Backend Development >PHP Tutorial >Android client Alipay written on php server side

Android client Alipay written on php server side

WBOY
WBOYOriginal
2016-07-25 09:13:021600browse

Generate private key

Enter the "genrsa -out rsa_private_key.pem 1024" command, and after pressing Enter, a new rsa_private_key.pem file will be added to the current bin file directory. The file is the original merchant private key (please save the file properly, PHP development language This file is required),

Generate public key

Enter the "rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem" command and press Enter. A new rsa_public_key.pem file will be added to the current bin file directory. The file is the original merchant public key (please save the file properly) file, this file is required in PHP 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 alipay_public_key.pem from the demo provided by Alipay



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