问题描述
我要集成在PHP Aadhaar号确认的Aadhaar卡身份验证API。我试着并写了code API访问权限。
怎样才能在PHP下面的XML加密字段数据? 是用Java编写的。
<验证UID =TID =AC =SA =版本=TXN =LK =>
<采用PI =啪=PFA =生物=BT =销=OTP =/>
< TKN TYPE =值=/>
< UDC元=FDC =IDC =点子=很多=G | PLOV =/>
其中p SKEY CI =KI =>加密和连接codeD会话密钥和LT; / SKEY>
<数据类型=X | P>加密PID块LT; /数据>
<&HMAC GT; PID模块的SHA-256散列,加密,然后连接codeD< / HMAC>
<签署及GT; AUA&LT的数字签名; /签署及GT;
< /验证>
要生成的XML,你可以使用这个库来很容易地生成它:
有关加密;我可能是错的,但它看起来像()您可生成Java一次性的EN codeD成果,只是在结果粘贴到你的PHP变量。
I want to integrate the Aadhaar Card Authentication API for Aadhaar number Verification in PHP. I tried this and wrote code for API access.
How can I generate the XML encryption field data below in PHP? This sample code is written in Java.
<Auth uid="" tid="" ac="" sa="" ver="" txn="" lk="">
<Uses pi="" pa="" pfa="" bio="" bt="" pin="" otp=""/>
<Tkn type="" value=""/>
<Meta udc="" fdc="" idc="" pip="" lot="G|P" lov=""/>
<Skey ci="" ki="">encrypted and encoded session key</Skey>
<Data type="X|P">encrypted PID block</Data>
<Hmac>SHA-256 Hash of Pid block, encrypted and then encoded</Hmac>
<Signature>Digital signature of AUA</Signature>
</Auth>
To generate the XML, you could use this library to generate it quite easily:
https://github.com/iwyg/xmlbuilder
For the encryption; I could be wrong but it looks like (from this page) you can generate the encoded results in java one time and just paste in the results to your PHP variables.
这篇关于如何在PHP中的Aadhaar号确认集成Aadhaar卡身份验证API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!