DES3_CBC
(
unsigned char cModel,
unsigned char *pKey,
unsigned char *In,
unsigned char *Out,
unsigned char *pIV
)
参数 |
类型 |
方向 |
含义 |
cModel |
unsigned char |
IN |
加解密模式选择: 0x00->加密 0x01->解密 |
pkey |
unsigned char* |
IN |
加解密密钥,16个字节 |
in |
unsigned char* |
IN |
原始数据,8个字节 |
out |
unsigned char* |
out |
加解密后的数据,8个字节 |
pIV |
unsigned char* |
IN |
加解密向量,8个字节 |
int stdcall DES3_CBC(unsigned char cModel, unsigned char *pKey,unsigned char *In, unsigned char *Out, unsigned char *pIV);
function DES3_CBC(cModel:Byte;pkey: PChar;InData:PChar;OutData:PChar;pIV:PChar): Integer;stdcall;external YOWOREADERDLL;
Public Declare Function DES3_CBC Lib "YW60x.dll" (ByVal cModel As Byte, ByRef pkey As Byte, ByRef InData As Byte, ByRef OutData As Byte, ByRef pIV As Byte) As Long
public int DES3_CBC(byte cModel, Pointer pKey,Pointer pInData, Pointer pOutData, Pointer pIV)
{
int ret;
try
{
JNative fuc = new JNative("YW60x.dll", "DES3_CBC");
fuc.setRetVal(Type.INT);
fuc.setParameter(0, cModel);
fuc.setParameter(1,pKey);
fuc.setParameter(2,pInData);
fuc.setParameter(3,pOutData);
fuc.setParameter(4,pIV);
fuc.invoke();
ret = fuc.getRetValAsInt();
}
catch(NativeException e)
{
ret = -1;
}
catch(IllegalAccessException e)
{
ret = -2;
}
return ret;
}
[DllImport("YW60x.dll")]
public static extern int DES3_CBC(byte cModel, byte [] pKey,byte [] pInData, byte [] pOutData, byte [] pIV);
public FUNCTION long DES3_CBC(char cModel, ref char pkey[], ref char InData[], ref char OutData[], ref char pIV[]) library "YW60x.dll"