How can I convert.
Code:
blob = struct.pack("<LLLLLLL", 28, CRYPT_MODE_CBC, CALC_3DES, CALG_SHA1, len(iv), len(hash), len(ciph))
to C++. I haven't really figured it out.
Printable View
How can I convert.
Code:
blob = struct.pack("<LLLLLLL", 28, CRYPT_MODE_CBC, CALC_3DES, CALG_SHA1, len(iv), len(hash), len(ciph))
to C++. I haven't really figured it out.
"<LLLLLLL" means seven unsigned long in little-endian order, so it should be:or something like that.Code:
struct something { unsigned long x; unsigned long mode; unsigned long cipher; ... }; something s; s.x = qToLittleEndian( (unsigned long)28 ); ...