Draft: Update utils so that they work with SMF
@tien-thinh.nguyen mainly added some functions that were there from SMF.
I did not have a detailed look at the convert_string_2_hex
vs ascii_to_hex
but I'd suggest that we unify them in another MR and that we get rid of malloc. There is a high risk of memory leaks here!