Horde_ActiveSync_Message_Base::_hex2bin PHP Method

_hex2bin() private static method

Function which converts a hex entryid to a binary entryid.
private static _hex2bin ( string $data ) : string
$data string The hexadecimal string
return string The binary data
    private static function _hex2bin($data)
    {
        $len = strlen($data);
        $newdata = '';
        for ($i = 0; $i < $len; $i += 2) {
            $newdata .= pack('C', hexdec(substr($data, $i, 2)));
        }
        return $newdata;
    }