0
Generate a 64 byte hex number
I want to generate a 64 byte hex number with a recurring pattern but would prefer not to enter a loooooooong string and I may want 128 byte equivalent at a later date hex_inner = 0x5c5c5c5c5c............. Is there a way to populate hex_inner with a short format statement....
2 Réponses
+ 3
You can do it with bit shifting.
hex_inner = 0
for i in range(0,64):
hex_inner |= 0x5c << (i * 8)
0
Thanks for that much appreciated