现在的位置: 首页 > 综合 > 正文

DCAApp 和 DXPApp 类的探索

2013年06月12日 ⁄ 综合 ⁄ 共 1344字 ⁄ 字号 评论关闭

引用里面添加DCAApp  DXPApp 两个dll

建立:

using DXPApp;

DCAApp.Service dcaService = new DCAApp.Service();

变量说明

icCode:ic卡号

carrierType:载体类型,分为ic卡、直接通过证书号进行操作的;

0成功,非0失败(查错误代码表,10几种)

strRandom:服务器端随机数

strRandomSigned:客户端加过签的服务器端随机数

isServerAuth:是否双向认证

strRandomClient:双向认证情况下,服务器对客户端加过签的随机数再次加签的数据。

类成员

认证过程相关函数 [DCAApp.Service]

int generateRandom(string icCode, string carrierType) 产生随机数

int verifyUser(string icCode, string carrierType, string strRandom, string strRandomSigned, bool isServerAuth, string strRandomClient)  验证用户,需进一步理解

加解密函数 [DCAApp.Service]

int encryptData(string icCode, string carrierType, string strUserData)  加密,暂时不知道carrierType是什么意思

int decryptData(string strUserData);  解密数据,应该是直接解密string

加签、验签函数 [DCAApp.Service]

string getResponse() 取得响应的数据

int signData(string strUserData) 验签函数, 没有加签的明文、加过签的密文

int verifySignData(string icCode, string carrierType, string strUserData, string signUserData) 验证签名

其他 [DCAApp.Service]

int getEnterpriseInfo(string icCode, string carrierType, string data, string signData)  取得企业信息, data是什么意思?

 

DXPApp.Service   (DXP = 数据交换系统)

string confirmData(DXPConfirmRequest req)

DXPFetchResponse fetchData(DXPFetchRequest req)

DXPQueryResponse queryData(DXPQueryRequest req)

DXPSendResponse sendData(DXPSendRequest req)

DXPApp.Helper

string getProperty(string key) 读取c:\dxp.conf文件中key对应value, 如key不存在则返回null,下例

Helper h = new Helper();

Console.WriteLine(h.getProperty(
"ServiceURL"));


byte[] service(string serviceType, byte[] b)

抱歉!评论已关闭.