This article mainly introduces the PHP interface data encryption, decryption, verification of the signature of the relevant information, the need for friends can refer to the following
The code is very simple, there is no more nonsense, directly on the code
The code is as follows:
<?php//header (' content-type:text/xml; Charset=utf-8 '); Include_once (DirName (dirname)). Directory_separator. ' Phpsec '. Directory_separator. ' Math '. Directory_separator. ' biginteger.php '); Include_once (DirName (dirname (__file__)). Directory_separator. ' Phpsec '. Directory_separator. ' Crypt '. Directory_separator. ' aes.php '); Include_once (DirName (dirname (__file__)). Directory_separator. ' Phpsec '. Directory_separator. ' Crypt '. Directory_separator. ' rsa.php ');//cipher $crypttext = ' v66ykulhfld2jelhm/j9qik2edr1jhdzic/k/ oesu2gbtx2usxyvf4jgvzvoihrre8fsfkmllmjsmijo5fdrs/fd20byfii4jw3bo3bzshxmz6aes2dwwg4sk9mnojfoc0ismov311x5/ jlguoqxkdy4f5hhpye9d/xgb0g2xe/hngssy2cpqcvqtblbmixwscknhseg92lovloz8ulwkqg5o7x+qb7p/emii/ wafaxbjxdxvzx7lmgcogon6wlhkjlgxorp6bixog6lgc6ux7bat3i9+0lujngxiq/sdsl23hsr3youpv5c5a813nrhx4hjyd/hbt1uviuml+ etmjwwcpsfs2cvxiur0ce57jazvyxjk13shk3iszhlppsm/jcdcrdy0co/d5uigjadzxdsq56xsju+tlvna1j6yq2tdifyk/ X6k911a5wxlkyxztd1nq+btyn3gv/wffrzvtgwqbrh06ihs2cwvna0s9ev/ypmhnajjmrx4trnr9nxq9xazaw4lgrg87u5qdv+nqjj1thk0xhfc69n9g2+dsagyes9tk6u0zq72hjzqzhbcdh1ukw0plyihjdxpgppowgp8/qvvu2jultekunvgaaec3n+ Gozfqjscdi1s6t2mtnjwywnofrbhvezfd/revgpastozdqa5nqr1b+muf70r6uw6mwlj7ct9tz3jq+ca '; $aeskey = Base64_decode (' qze60qzfxuirub2ey4+7+q== ');//aes decryption, using ECB mode $aes = new Crypt_aes (CRYPT_MODE_ECB);//Set AES key $aes->setkey ($aeskey) ;//Decrypt AES Ciphertext $plaintext = $aes->decrypt (Base64_decode ($crypttext)); echo $plaintext; Echo '
Summary : The above is the entire content of this article, I hope to be able to help you learn.