[1] Add hex length output.
[2] Optimize some code.