日期:2014-05-17  浏览次数:20897 次

c# usbkey开发问题?
public abstract void
MD5HMAC(
  int lFileID1, /*[ in]*/
  int lFileID2, /*[ in]*/
  byte pText[], /*[ in]*/
  int lTextLen, /*[ in]*/
  byte pDigest[] /*[out]*/
);这个是java的帮助文档
 对pText[],加密为什么需要两个文件
 想了好久还是想不通
 服务器是怎么保存密匙的

------解决方案--------------------
lFileID1
[in] File ID of the first file.
输入参数,第一个文件
lFileID2
[in] File ID of the second file.
输入参数 第二个文件
pText
[in] Points to data used as the challenge input, and not exceed 55 bytes.
输入参数,指向一个数据缓冲区的指针,数据缓冲区中的数据不能大于55字节
lTextLen
[in] Length of the challenge, and not exceed 55 bytes.
输入参数,数据长度,不能大于55字节
pDigest
[out] Pointer to a 16-byte buffer that receives the message digest.
输出参数,指向16字节的缓冲区用于接收摘要信息(加密后的输出信息)
Remarks

This method automatically closes currently opened file.
//这个方法能可以自动的关闭当前打开的文件

To create the key files on the device, you may use the IHash.MD5_HMAC software 
function on a the shared secret. And you need create two file to save the generated key value. The file type should be defined as ePassDef.EPAS_FILETYPE_KEY.
在设备上创建key的文件,你可以使用IHash.MD5_HMAC函数,你需要创建两个文件用来保存生成的key信息,文件类型应当是ePassDef.EPAS_FILETYPE_KEY;

//也不太懂,但应该是中国人写的,

------解决方案--------------------
没有提到,不清楚;