How can I convert.
Qt Code:
blob = struct.pack("<LLLLLLL", 28, CRYPT_MODE_CBC, CALC_3DES, CALG_SHA1, len(iv), len(hash), len(ciph))To copy to clipboard, switch view to plain text mode
to C++. I haven't really figured it out.
How can I convert.
Qt Code:
blob = struct.pack("<LLLLLLL", 28, CRYPT_MODE_CBC, CALC_3DES, CALG_SHA1, len(iv), len(hash), len(ciph))To copy to clipboard, switch view to plain text mode
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.Qt Code:
struct something { unsigned long x; unsigned long mode; unsigned long cipher; ... }; something s; s.x = qToLittleEndian( (unsigned long)28 ); ...To copy to clipboard, switch view to plain text mode
Bookmarks