> > Can you find it? > > QString > MakeDigest( QStringList list ) { > QCryptographicHash ch(QCryptographicHash::Md5); > foreach( QString s, list ) > ch.addData( s.toAscii() ); > return ch.result(); > } >
Yes. The problem is in the conversion from QByteArray (ch.result) to the return type, QString. (I have the bad habit of using QString for everything as they provide more operations). The constructor QString(const QByteArray&) will stop if it finds a zero byte and digests can contain a zero byte anywhere in the set of 16 for an MD5. I did not see this coming as QStrings can contain null characters QChar('\0') and it knows what the length of the QByteArray is. So, why stop at a null byte? I can understand that with QString(const char *). I guess I have to read ALL of the documentation, not just for the hard parts. Bill _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest