memset(miyao, 0, 17);
GetDlgItemText(hwnd,IDC_EDIT1,ivec,sizeof(ivec));
GetDlgItemText(hwnd,IDC_EDIT2,miyao,sizeof(miyao));
GetDlgItemText(hwnd,IDC_EDIT3,in,sizeof(in));
length=strlen(in);
AES_set_encrypt_key(miyao, 128, &ckey);
AES_cbc_encrypt( in,out,length,&ckey,ivec, AES_ENCRYPT);
sprintf_s(out,"%X",out);
SetDlgItemText(hwnd,IDC_EDIT4,out);
}
byte數組本來就是一些char數據。直接用加密tool對比結果