函数调用代码
//函数函数中的mode=1表示加密,mode=2表示解密,否则该函数返回false
Function boolean DES(ref string inStr, ref string key, ref string outStr, int mode) library "NetDiskDll.dll"
加密代码:
string inStr,outStr
string key = "jintongkeji"
inStr = trim(sle_2.text)
outStr = space(512) //这个一定要给足够的空间
//注意该函数的参数inStr的长度必须>0
DES(ref inStr, ref key, ref outStr, 1)
sle_8.text = trim(outStr)
解密代码:
string inStr,outStr
string key = "jintongkeji"
inStr = trim(sle_8.text)
outStr = space(512) //这个已经要给足够的空间
DES(ref inStr, ref key, ref outStr, 2)
sle_9.text = trim(outStr)
- 1
- 2
- 3
- 4
前往页