Added hex en/decoding