replace some stray hexdec/base_convert functions with usage of the math adapter
Refactored to adhere to new PHPECC updates