主题:求助:c++ 程序段 转换为 delphi 程序段
void __fastcall TForm1::Button1Click(TObject *Sender)
{
int i;
unsigned char kkk[8];
unsigned char ppp[8];//输入
unsigned char ccc[8];//输出
AnsiString l;
for (i=0;i<6;i++){
l = "0x" + Edit1->Text.SubString(i*2 + 1,2);
kkk[i]=StrToInt(l);
}
for (i=0;i<4;i++) ppp[i]=StrToInt("0x" + Edit2->Text.SubString(i*2 + 1,2));
MyDes(kkk, ppp, ccc);
Edit3->Clear();
for (i=0;i<6;i++) Edit3->Text = Edit3->Text + IntToHex(ccc[i],2);
}[em14]
{
int i;
unsigned char kkk[8];
unsigned char ppp[8];//输入
unsigned char ccc[8];//输出
AnsiString l;
for (i=0;i<6;i++){
l = "0x" + Edit1->Text.SubString(i*2 + 1,2);
kkk[i]=StrToInt(l);
}
for (i=0;i<4;i++) ppp[i]=StrToInt("0x" + Edit2->Text.SubString(i*2 + 1,2));
MyDes(kkk, ppp, ccc);
Edit3->Clear();
for (i=0;i<6;i++) Edit3->Text = Edit3->Text + IntToHex(ccc[i],2);
}[em14]