Cadence Design Systems interview question

encode and decode string hex