Use "%02x".
The two means you always want the output to be (at least) two characters wide.
The zero means if padding is necessary, to use zeros instead of spaces.
Use "%02x".
The two means you always want the output to be (at least) two characters wide.
The zero means if padding is necessary, to use zeros instead of spaces.