I never ever worked with Hex-strings in PHP (or whatever language). Now I'm wondering how I could add padding to a hex string with 00 (in hex) up until it reaches 8 bytes.
$hex = bin2hex("MAIN");
How can I add 00
for the remaining bytes so that $hex
holds 8 bytes?