private function prepareEntriesToDeliver(array $entries)
    {
        $binaryAttributes = ['objectguid', 'objectsid'];

        foreach ($entries as $key => &$entry) {
            foreach ($binaryAttributes as $binaryAttribute) {
                if (array_key_exists($binaryAttribute, $entry)) {
                    if (is_array($entry[$binaryAttribute])) {
                        foreach ($entry[$binaryAttribute] as &$value) {
                            $value = bin2hex($value);
                        }
                    } else {
                        $entry[$binaryAttribute] = bin2hex($entry[$binaryAttribute]);
                    }
                }
            }
        }

        return $entries;
    }