protected static function convertToString(array $byteArray)
    {
        // Convert the bytes to a string
        $string = '';
        foreach ($byteArray as $byte)
        {
            $string .= chr($byte);
        }

        return $string;
    }