from the C .h file: void GenerateHash(short version_major, const unsigned char *url, unsigned char hashSelect, unsigned char *outhash, int request_id); from a .cpp: void ContentFetcher::getDaap( const QString & path ) { QHttpRequestHeader header( "GET", path ); header.setValue( "Accept-Encoding", "gzip" ); unsigned char hash[33] = {0}; unsigned char unsignedPath[ path.length() ] = {0}; for( uint i = 0; i< path.length() ; i++ ){ unsignedPath[i] = reinterpret_cast(path.ascii()[i]); } GenerateHash(3, unsignedPath , 2, hash, s_requestId); header.setValue( "User-Agent", "iTunes/4.6 (Windows; N)" ); header.setValue( "Client-DAAP-Version", "3.0" ); for( int i = 0; i < 33 ; i++ ){ hash[i] = reinterpret_cast(hash[i]); } header.setValue( "Client-DAAP-Validation", reinterpret_cast(hash) ); header.setValue( "Client-DAAP-Access-Index", "2" ); header.setValue( "Client-DAAP-Request-ID", QString::number( s_requestId ) ); request( header ); debug() << hash << ' ' << path.ascii() << ' ' << reinterpret_cast(path.ascii()) << endl; }