$s='0102030405060A0BC' # Fix to even number of chars $s.=(length($s)%2?"F":"") for($i=0; $i